[Bf-blender-cvs] [7336af32593] master: Fix some shortcut keys not working on macOS with Japanese input

Yuki Hashimoto noreply at git.blender.org
Wed Dec 1 19:45:59 CET 2021


Commit: 7336af32593721429676e32b475de8e7b03e37af
Author: Yuki Hashimoto
Date:   Wed Dec 1 19:35:11 2021 +0100
Branches: master
https://developer.blender.org/rB7336af32593721429676e32b475de8e7b03e37af

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