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

Function normalizeKeyForValidation

packages/hotkeys/src/validate.ts:81–93  ·  view source on GitHub ↗

* Normalizes a key for validation checking.

(key: string)

Source from the content-addressed store, hash-verified

79 )
80 }
81
82 return {
83 valid: errors.length === 0,
84 warnings,
85 errors,
86 }
87}
88
89/**
90 * Checks if a key is in the known keys set.
91 */
92function isKnownKey(key: string): boolean {
93 if (/^\[[A-Za-z][A-Za-z0-9]*\]$/.test(key)) return true
94 if (Array.from(key).length === 1) return true
95 // Check direct match
96 if (ALL_KEYS.has(key as any)) {

Callers 1

validateHotkeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…