A raw key token from a binding string.
The normalized key, comparable against a lowercased event.key.
normalizeKey("UpArrow"); // "arrowup"
normalizeKey("Esc"); // "escape"
normalizeKey("A"); // "a"
export function normalizeKey(token: string): string {
const lower = token.trim().toLowerCase();
return KEY_ALIASES[lower] ?? lower;
}
Normalizes a single binding token (e.g.
"UpArrow","Esc","A") to the lowercasedKeyboardEvent.keyvalue it should match. Unknown tokens map to their own lowercased form.