[macOS] Fix ⌘ + . + other modifier triggering twice.

(cherry picked from commit bfbbe9c1d0)
This commit is contained in:
bruvzg 2022-10-03 20:44:33 +03:00 committed by Rémi Verschelde
parent f1bafe8131
commit 10073768cf
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -137,7 +137,7 @@ static NSCursor *cursorFromSelector(SEL selector, SEL fallback = nil) {
// special case handling of command-period, which is traditionally a special
// shortcut in macOS and doesn't arrive at our regular keyDown handler.
if ([event type] == NSEventTypeKeyDown) {
if (([event modifierFlags] & NSEventModifierFlagCommand) && [event keyCode] == 0x2f) {
if ((([event modifierFlags] & NSEventModifierFlagDeviceIndependentFlagsMask) == NSEventModifierFlagCommand) && [event keyCode] == 0x2f) {
Ref<InputEventKey> k;
k.instance();