mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 18:39:52 +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;
|
isrun : Boolean;
|
||||||
function isRunning: Boolean; override;
|
function isRunning: Boolean; override;
|
||||||
procedure run; override;
|
procedure run; override;
|
||||||
|
procedure sendEvent(theEvent: NSEvent); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TCocoaWidgetSet }
|
{ TCocoaWidgetSet }
|
||||||
@ -368,6 +369,15 @@ begin
|
|||||||
aloop();
|
aloop();
|
||||||
end;
|
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
|
// the implementation of the utility methods
|
||||||
{$I cocoaobject.inc}
|
{$I cocoaobject.inc}
|
||||||
|
Loading…
Reference in New Issue
Block a user