MCPcopy Index your code
hub / github.com/philc/vimium / isPassKey

Method isPassKey

content_scripts/mode_key_handler.js:105–117  ·  view source on GitHub ↗
(keyChar)

Source from the content-addressed store, hash-verified

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);

Callers 3

isMappedKeyMethod · 0.95
isCountKeyMethod · 0.95
dom_tests.jsFile · 0.80

Calls 1

filterMethod · 0.45

Tested by

no test coverage detected