(keyChar)
| 103 | // example, if 't' is a passKey, then the "t"-s of 'gt' and '99t' are neverthless handled as |
| 104 | // regular keys. |
| 105 | isPassKey(keyChar) { |
| 106 | // Find all *continuation* mappings for keyChar in the current key state (i.e. not the full key |
| 107 | // mapping). |
| 108 | const mappings = this.keyState.filter((mapping) => |
| 109 | keyChar in mapping && (mapping !== this.keyMapping) |
| 110 | ); |
| 111 | // If there are no continuation mappings, and there's no count prefix, and keyChar is a pass |
| 112 | // key, then it's a pass key. |
| 113 | return mappings.length == 0 && |
| 114 | this.countPrefix == 0 && |
| 115 | this.passKeys && |
| 116 | this.passKeys.includes(keyChar); |
| 117 | } |
| 118 | |
| 119 | isInResetState() { |
| 120 | return (this.countPrefix === 0) && (this.keyState.length === 1); |
no test coverage detected