Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorYuki Hashimoto <hzuika>2021-12-01 21:35:11 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-12-01 21:40:47 +0300
commit7336af32593721429676e32b475de8e7b03e37af (patch)
tree2a6796ae0a00dcf1171baa3d1038bf85a50895b2 /intern
parent128ebdb062404fa54fdae72043058655a504ade1 (diff)
Fix some shortcut keys not working on macOS with Japanese input
Differential Revision: https://developer.blender.org/D13414
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_WindowViewCocoa.h8
1 files changed, 8 insertions, 0 deletions
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: