mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 22:58:50 +02:00
Cocoa: Fix the issue that the Space key on the Button does not work
This commit is contained in:
parent
82784f13b1
commit
b0bb460a46
@ -371,8 +371,10 @@ end;
|
||||
|
||||
procedure TCocoaButton.keyDown(event: NSEvent);
|
||||
begin
|
||||
if event.keyCode = kVK_Space then
|
||||
if event.keyCode = kVK_Space then begin
|
||||
lclCheckMixedAllowance;
|
||||
inherited keyDown(event);
|
||||
end;
|
||||
end;
|
||||
|
||||
function TCocoaButton.performKeyEquivalent(event: NSEvent): LCLObjCBoolean;
|
||||
|
@ -648,7 +648,8 @@ var
|
||||
textView: NSView;
|
||||
isFirst: Boolean;
|
||||
begin
|
||||
if (not _inIME) and (theEvent.keyCode in [kVK_Return, kVK_ANSI_KeypadEnter, kVK_Escape]) then
|
||||
if (not _inIME) and (theEvent.keyCode in
|
||||
[kVK_Return, kVK_ANSI_KeypadEnter, kVK_Escape, kVK_Space]) then
|
||||
begin
|
||||
inherited;
|
||||
exit;
|
||||
|
Loading…
Reference in New Issue
Block a user