This problem is probably very specific to me, it depends on KControls on Cocoa and I don't expect too many readers will have KControls installed. But I'm hoping for some general advice that might help me track it down.
Using (Fixes_2_0) cocoa any key press that shows a visible character (ie, not a space, ctrl-char, delete key etc) into KMemo produces a 'bonk' sound. Mac seems to do it elsewhere as some sort of acknowledgement but very annoying when just typing away. Cocoa (and Linux/Windows) does not do it.
I traced a keypress as far as CocoaPrivate.pas, line #652 where inherited keyDown(event) is called -
procedure TCocoaCustomControl.keyDown(event: NSEvent);
begin
if not Assigned(callback) or not callback.KeyEvent(event) then
inherited keyDown(event);
end;
Its not a case that the inherited function should not be called, commenting it out prevents the keystroke form appearing at all. Now, TCocoaCustomControl is a declared like this -
TCocoaCustomControl = objcclass(NSControl)
and NSControl is declared in the fpc rtl in NSControl.inc As its in FPC code rather than LCL, no debugging and I've had to stop there. I did look in NSControl.inc, it declares what looks like bindings to the apple libraries to my uneducated gaze.
So, either the 'bonk' is caused by something in NSControl (unlikely) or its subsequently calls something, perhaps back in KControls that generates this annoying noise.
Can anyone suggest another approach to this issue ?
(Don't hesitate to suggest something obvious, I am not at all a comfortable Mac user !)
Davo