MCPcopy Create free account
hub / github.com/TanStack/hotkeys / isKeyHeld

Method isKeyHeld

packages/hotkeys/src/key-state-tracker.ts:207–210  ·  view source on GitHub ↗

* Checks if a specific key is currently being held. * * @param key - The key name to check (case-insensitive) * @returns True if the key is currently held

(key: string)

Source from the content-addressed store, hash-verified

205 * @returns True if the key is currently held
206 */
207 isKeyHeld(key: string): boolean {
208 const normalizedKey = normalizeKeyName(key)
209 return this.#heldKeysSet.has(normalizedKey)
210 }
211
212 /**
213 * Checks if any of the given keys are currently held.

Callers 3

isAnyKeyHeldMethod · 0.95
areAllKeysHeldMethod · 0.95

Calls 1

normalizeKeyNameFunction · 0.90

Tested by

no test coverage detected