瀏覽代碼

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

(cherry picked from commit bfbbe9c1d043cdd8550f5e41a8976d785da10c0f)
bruvzg 2 年之前
父節點
當前提交
10073768cf
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      platform/osx/os_osx.mm

+ 1 - 1
platform/osx/os_osx.mm

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