MCPcopy
hub / github.com/codeaashu/claude-code / chordExactlyMatches

Function chordExactlyMatches

src/keybindings/resolver.ts:140–152  ·  view source on GitHub ↗

* Check if a full chord matches a binding's chord.

(
  chord: ParsedKeystroke[],
  binding: ParsedBinding,
)

Source from the content-addressed store, hash-verified

138 * Check if a full chord matches a binding's chord.
139 */
140function chordExactlyMatches(
141 chord: ParsedKeystroke[],
142 binding: ParsedBinding,
143): boolean {
144 if (chord.length !== binding.chord.length) return false
145 for (let i = 0; i < chord.length; i++) {
146 const chordKey = chord[i]
147 const bindingKey = binding.chord[i]
148 if (!chordKey || !bindingKey) return false
149 if (!keystrokesEqual(chordKey, bindingKey)) return false
150 }
151 return true
152}
153
154/**
155 * Resolve a key with chord state support.

Callers 1

resolveKeyWithChordStateFunction · 0.85

Calls 1

keystrokesEqualFunction · 0.85

Tested by

no test coverage detected