From 922352ea1bf222e0f44251d00cd894762e17cdd1 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Tue, 1 Mar 2022 19:31:09 +0800 Subject: [PATCH] KeyHandler // Bind a12l mode pref to functions. --- Source/Modules/ControllerModules/KeyHandler.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Modules/ControllerModules/KeyHandler.mm b/Source/Modules/ControllerModules/KeyHandler.mm index 04a2b401..3a245494 100644 --- a/Source/Modules/ControllerModules/KeyHandler.mm +++ b/Source/Modules/ControllerModules/KeyHandler.mm @@ -272,10 +272,10 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; return NO; } - // Caps Lock processing : if Caps Lock is on, temporarily disable bopomofo. + // Caps Lock processing : if Caps Lock is on or Preferences.isAlphanumericalModeEnabled, temporarily disable bopomofo. if ([input isBackSpace] || [input isEnter] || [input isAbsorbedArrowKey] || [input isExtraChooseCandidateKey] || [input isExtraChooseCandidateKeyReverse] || [input isCursorForward] || [input isCursorBackward]) { // do nothing if backspace is pressed -- we ignore the key - } else if ([input isCapsLockOn]) { + } else if ([input isCapsLockOn] || Preferences.isAlphanumericalModeEnabled) { // process all possible combination, we hope. [self clear]; InputStateEmpty *emptyState = [[InputStateEmpty alloc] init];