소스 검색

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