mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 21:41:35 +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;
|
resp : NSResponder;
|
||||||
wn : NSWindow;
|
wn : NSWindow;
|
||||||
ch : System.WideChar;
|
ch : System.WideChar;
|
||||||
|
flags: NSEventModifierFlags;
|
||||||
|
const
|
||||||
|
NSModsMask = NSControlKeyMask
|
||||||
|
or NSAlternateKeyMask
|
||||||
|
or NSCommandKeyMask;
|
||||||
begin
|
begin
|
||||||
Result := false;
|
Result := false;
|
||||||
|
|
||||||
@ -387,7 +392,8 @@ begin
|
|||||||
// prevent further processing. Actually clicking the buttons is handled in
|
// prevent further processing. Actually clicking the buttons is handled in
|
||||||
// the LCL in response to the keyUp
|
// the LCL in response to the keyUp
|
||||||
// add NumericPadEnter supported.
|
// 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
|
begin
|
||||||
ch := NSEventRawKeyChar(event);
|
ch := NSEventRawKeyChar(event);
|
||||||
if (((ch = System.WideChar(NSCarriageReturnCharacter)) and wincallback.HasDefaultControl)
|
if (((ch = System.WideChar(NSCarriageReturnCharacter)) and wincallback.HasDefaultControl)
|
||||||
|
Loading…
Reference in New Issue
Block a user