MCPcopy
hub / github.com/jaywcjlove/hotkeys-js / code

Function code

src/index.ts:42–45  ·  view source on GitHub ↗
(x: string)

Source from the content-addressed store, hash-verified

40
41/** Return key code */
42const code = (x: string): number =>
43 _keyMap[x.toLowerCase()] ||
44 _modifier[x.toLowerCase()] ||
45 x.toUpperCase().charCodeAt(0);
46
47const getKey = (x: number): string | undefined =>
48 Object.keys(_keyMap).find((k) => _keyMap[k] === x);

Callers 6

getAllKeyCodesFunction · 0.85
isPressedFunction · 0.85
clearModifierFunction · 0.85
eachUnbindFunction · 0.85
dispatchFunction · 0.85
index.tsFile · 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…