KeyHandler // Bind a12l mode pref to functions.

This commit is contained in:
ShikiSuen 2022-03-01 19:31:09 +08:00
parent 8c7c0446a3
commit 62d9c9ce9d
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;
}
// 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];