MCPcopy
hub / github.com/codeaashu/claude-code / captureKeyCombo

Function captureKeyCombo

web/components/settings/KeyboardSettings.tsx:27–37  ·  view source on GitHub ↗
(e: KeyboardEvent)

Source from the content-addressed store, hash-verified

25};
26
27function captureKeyCombo(e: KeyboardEvent): string {
28 e.preventDefault();
29 const parts: string[] = [];
30 if (e.ctrlKey || e.metaKey) parts.push("Ctrl");
31 if (e.altKey) parts.push("Alt");
32 if (e.shiftKey) parts.push("Shift");
33 if (e.key && !["Control", "Alt", "Shift", "Meta"].includes(e.key)) {
34 parts.push(e.key === " " ? "Space" : e.key);
35 }
36 return parts.join("+");
37}
38
39function ShortcutRow({
40 id,

Callers 1

handlerFunction · 0.85

Calls 2

preventDefaultMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected