mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 21:35:57 +02:00
cocoa: patch by lks, to handle keyup events with CMD key hold. #33503. Patch applied with a small change of always inheriting sendEvent method
git-svn-id: trunk@57617 -
This commit is contained in:
parent
1a38dc5407
commit
ffd19f25dc
@ -82,6 +82,7 @@ type
|
||||
isrun : Boolean;
|
||||
function isRunning: Boolean; override;
|
||||
procedure run; override;
|
||||
procedure sendEvent(theEvent: NSEvent); override;
|
||||
end;
|
||||
|
||||
{ TCocoaWidgetSet }
|
||||
@ -368,6 +369,15 @@ begin
|
||||
aloop();
|
||||
end;
|
||||
|
||||
procedure TCocoaApplication.sendEvent(theEvent: NSEvent);
|
||||
begin
|
||||
// https://stackoverflow.com/questions/4001565/missing-keyup-events-on-meaningful-key-combinations-e-g-select-till-beginning
|
||||
if (theEvent.type_ = NSKeyUp) and
|
||||
((theEvent.modifierFlags and NSCommandKeyMask) = NSCommandKeyMask)
|
||||
then
|
||||
self.keyWindow.sendEvent(theEvent);
|
||||
inherited sendEvent(theEvent);
|
||||
end;
|
||||
|
||||
// the implementation of the utility methods
|
||||
{$I cocoaobject.inc}
|
||||
|
Loading…
Reference in New Issue
Block a user