KeyHandler // Bind a12l mode pref to functions.

This commit is contained in:
ShikiSuen 2022-03-01 19:31:09 +08:00
parent 3c176086e0
commit 922352ea1b
1 changed files with 2 additions and 2 deletions

View File

@ -272,10 +272,10 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
return NO; 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]) { 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 // 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. // process all possible combination, we hope.
[self clear]; [self clear];
InputStateEmpty *emptyState = [[InputStateEmpty alloc] init]; InputStateEmpty *emptyState = [[InputStateEmpty alloc] init];