mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 00:02:50 +02:00
cocoa: adding a direct call of .keyDown when handling sendEvent() of NSWindow (not NSPanel). Cocoa prevents call to .keyDown() with Control+Arrow Keys in IDE configuration
git-svn-id: trunk@58648 -
This commit is contained in:
parent
17dd3e68b9
commit
123ec7ffae
@ -851,6 +851,20 @@ begin
|
||||
else
|
||||
inherited sendEvent(event);
|
||||
end
|
||||
else if event.type_ = NSKeyDown then
|
||||
begin
|
||||
if Assigned(firstResponder) and (firstResponder.isKindOfClass_(TCocoaCustomControl)) then
|
||||
begin
|
||||
//todo: (hack!) for whatever Cocoa prevents the processing of Control+Left, Control+Right (Control+Arrow Keys)
|
||||
// events in IDE configuration. The standalone test is working just fine.
|
||||
// presumably NSWindow.sendEvent() should call keyDown() directly
|
||||
// (the only keys supressesed by Cocoa are Tab or Shift+Tab)
|
||||
// So, instead of figuring out why Cocoa suppresses the navigation
|
||||
// the overrride method simply forces keyDown() call
|
||||
firstResponder.keyDown(event);
|
||||
end else
|
||||
inherited sendEvent(event);
|
||||
end
|
||||
else
|
||||
inherited sendEvent(event);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user