Fix some shortcut keys not working on macOS with Japanese input

Differential Revision: https://developer.blender.org/D13414
This commit is contained in:
Yuki Hashimoto 2021-12-01 19:35:11 +01:00 committed by Brecht Van Lommel
parent 128ebdb062
commit 7336af3259
Notes: blender-bot 2023-10-13 01:54:23 +02:00
Referenced by issue #93479, 3.0 Potential candidates for corrective releases
1 changed files with 8 additions and 0 deletions

View File

@ -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: