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
Notes: blender-bot 2023-02-14 11:29:52 +01: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: