MCPcopy Index your code
hub / github.com/anomalyco/opencode / normalizeKey

Function normalizeKey

packages/app/src/context/command.tsx:44–49  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

42}
43
44function normalizeKey(key: string) {
45 if (key === ",") return "comma"
46 if (key === "+") return "plus"
47 if (key === " ") return "space"
48 return key.toLowerCase()
49}
50
51function signature(key: string, ctrl: boolean, meta: boolean, shift: boolean, alt: boolean) {
52 const mask = (ctrl ? 1 : 0) | (meta ? 2 : 0) | (shift ? 4 : 0) | (alt ? 8 : 0)

Callers 2

signatureFromEventFunction · 0.70
matchKeybindFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected