diff --git a/common/web/input-processor/src/correctionLayout.ts b/common/web/input-processor/src/correctionLayout.ts index d87f0c9b60..6969d93f40 100644 --- a/common/web/input-processor/src/correctionLayout.ts +++ b/common/web/input-processor/src/correctionLayout.ts @@ -81,7 +81,7 @@ export function correctionKeyFilter(key: ActiveKeyBase): boolean { return false; // Attempt to filter out known non-output keys. // Results in a more optimized distribution. - } else if(Codes.isKnownOSKModifierKey(key.baseKeyID)) { + } else if(Codes.isKeyNotCorrected(key.baseKeyID)) { return false; } else if(key.isPadding) { // to the user, blank / padding keys do not exist. return false; diff --git a/common/web/input-processor/src/text/inputProcessor.ts b/common/web/input-processor/src/text/inputProcessor.ts index 74f37ba06c..1b3030f795 100644 --- a/common/web/input-processor/src/text/inputProcessor.ts +++ b/common/web/input-processor/src/text/inputProcessor.ts @@ -199,7 +199,7 @@ export default class InputProcessor { // If it's a key that we 'optimize out' of our fat-finger correction algorithm, // we MUST NOT trigger it for this keystroke. - let isOnlyLayerSwitchKey = Codes.isKnownOSKModifierKey(keyEvent.kName); + let isOnlyLayerSwitchKey = Codes.isKeyNotCorrected(keyEvent.kName); // Best-guess stopgap for possible custom modifier keys. // If a key (1) does not affect the context and (2) shifts the active layer, diff --git a/common/web/keyboard-processor/src/text/codes.ts b/common/web/keyboard-processor/src/text/codes.ts index 3f1ebe7afe..654acad68b 100644 --- a/common/web/keyboard-processor/src/text/codes.ts +++ b/common/web/keyboard-processor/src/text/codes.ts @@ -86,7 +86,7 @@ const Codes = { [')!@#$%^&*(',':+<_>?~', '{|}"'] ], - isKnownOSKModifierKey(keyID: string): boolean { + isKeyNotCorrected(keyID: string): boolean { switch(keyID) { case 'K_SHIFT': case 'K_LOPT': @@ -98,13 +98,6 @@ const Codes = { if(Codes.keyCodes[keyID] >= 50000) { // A few are used by `sil_euro_latin`. return true; // is a 'K_' key defined for layer shifting or 'control' use. } - // Refer to text/codes.ts - these are Keyman-custom "keycodes" used for - // layer shifting keys. To be safe, we currently let K_TABBACK and - // K_TABFWD through, though we might be able to drop them too. - const code = Codes[keyID]; - if(code > 50000 && code < 50011) { - return true; - } } return false;