MCPcopy Index your code
hub / github.com/codeaashu/claude-code / parseKey

Function parseKey

web/lib/keyParser.ts:18–28  ·  view source on GitHub ↗
(keyString: string)

Source from the content-addressed store, hash-verified

16 * `mod` = Cmd on Mac, Ctrl on Win/Linux
17 */
18export function parseKey(keyString: string): ParsedKey {
19 const parts = keyString.toLowerCase().split("+");
20 const key = parts[parts.length - 1];
21 return {
22 mod: parts.includes("mod"),
23 ctrl: parts.includes("ctrl"),
24 shift: parts.includes("shift"),
25 alt: parts.includes("alt"),
26 key,
27 };
28}
29
30/**
31 * Test whether a KeyboardEvent matches a parsed key definition.

Callers 1

handlerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected