Fix ⌘ + . + other modifier triggering twice.

(cherry picked from commit bfbbe9c1d043cdd8550f5e41a8976d785da10c0f)
This commit is contained in:
bruvzg 2022-10-03 20:44:33 +03:00 committed by Relintai
parent 658e19194d
commit 47ab7e8ff8

View File

@ -135,7 +135,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();