mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-19 09:09:32 +02:00
Cocoa: fix ESC/ENTER with ModifierFlag handle in TCocoaWindowContent.performKeyEquivalent
This commit is contained in:
parent
dd6cb894c8
commit
5d31c9aebb
@ -380,6 +380,11 @@ var
|
||||
resp : NSResponder;
|
||||
wn : NSWindow;
|
||||
ch : System.WideChar;
|
||||
flags: NSEventModifierFlags;
|
||||
const
|
||||
NSModsMask = NSControlKeyMask
|
||||
or NSAlternateKeyMask
|
||||
or NSCommandKeyMask;
|
||||
begin
|
||||
Result := false;
|
||||
|
||||
@ -387,7 +392,8 @@ begin
|
||||
// prevent further processing. Actually clicking the buttons is handled in
|
||||
// the LCL in response to the keyUp
|
||||
// add NumericPadEnter supported.
|
||||
if Assigned(wincallback) and ((event.modifierFlags=0) or (event.modifierFlags=$200000)) then
|
||||
flags:= event.modifierFlags and NSModsMask;
|
||||
if Assigned(wincallback) and (flags=0) then
|
||||
begin
|
||||
ch := NSEventRawKeyChar(event);
|
||||
if (((ch = System.WideChar(NSCarriageReturnCharacter)) and wincallback.HasDefaultControl)
|
||||
|
Loading…
Reference in New Issue
Block a user