[Bf-blender-cvs] [8b44b756d85] blender-v3.0-release: Fix some shortcut keys not working on macOS with Japanese input

Yuki Hashimoto noreply at git.blender.org
Mon Jan 10 17:04:39 CET 2022


Commit: 8b44b756d850db38ab4d83513682f2012d88a3f4
Author: Yuki Hashimoto
Date:   Wed Dec 1 19:35:11 2021 +0100
Branches: blender-v3.0-release
https://developer.blender.org/rB8b44b756d850db38ab4d83513682f2012d88a3f4

Fix some shortcut keys not working on macOS with Japanese input

Differential Revision: https://developer.blender.org/D13414

===================================================================

M	intern/ghost/intern/GHOST_WindowViewCocoa.h

===================================================================

diff --git a/intern/ghost/intern/GHOST_WindowViewCocoa.h b/intern/ghost/intern/GHOST_WindowViewCocoa.h
index fa629528809..1bda59c3505 100644
--- a/intern/ghost/intern/GHOST_WindowViewCocoa.h
+++ b/intern/ghost/intern/GHOST_WindowViewCocoa.h
@@ -510,6 +510,14 @@
 - (void)checkKeyCodeIsControlChar:(NSEvent *)event
 {
   ime.state_flag &= ~GHOST_IME_KEY_CONTROL_CHAR;
+
+  /* Don't use IME for command and ctrl key combinations, these are shortcuts. */
+  if ([event modifierFlags] & (NSEventModifierFlagCommand | NSEventModifierFlagControl)) {
+    ime.state_flag |= GHOST_IME_KEY_CONTROL_CHAR;
+    return;
+  }
+
+  /* Don't use IME for these control keys. */
   switch ([event keyCode]) {
     case kVK_ANSI_KeypadEnter:
     case kVK_ANSI_KeypadClear:



More information about the Bf-blender-cvs mailing list