/** * The name a key goes by in the graph: `KeyboardEvent.key`, with a single character lower-cased. * Shift and Caps Lock turn "a" into "A" on the way down or up, but it is still the same key – * without this, a key pressed as "a" and let go as "A" would stay held (#227). */ export function keyName(key: string): string { return key.length === 1 ? key.toLowerCase() : key; }