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 Philipp Oeser
parent 24a79289b0
commit 8b44b756d8

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: