mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 14:18:17 +02:00
Cocoa: improve #40608: special processing for '+/=' as KeyEquivalent
This commit is contained in:
parent
06a9e27523
commit
57f76d3946
@ -140,6 +140,16 @@ begin
|
||||
ShiftKeyMask := ShiftKeyMask + NSControlKeyMask;
|
||||
if ssMeta in s then
|
||||
ShiftKeyMask := ShiftKeyMask + NSCommandKeyMask;
|
||||
|
||||
// as a key , +/= is a rare case, both + and = are used as primary keys.
|
||||
// ‘Shift+=’ for ‘+’
|
||||
// ‘=’ for ‘='
|
||||
if key.isEqualToString(NSSTR('+')) then begin
|
||||
if (ShiftKeyMask and NSShiftKeyMask)=0 then
|
||||
key := NSStr('=')
|
||||
else
|
||||
ShiftKeyMask := ShiftKeyMask - NSShiftKeyMask;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure ToggleAppNSMenu(mn: NSMenu; ALogicalEnabled: Boolean);
|
||||
|
Loading…
Reference in New Issue
Block a user