diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index 8c4f493dc..3009dd483 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -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 k; k.instance();