MCPcopy Create free account
hub / github.com/Codehagen/Badget / handler

Function handler

src/components/dialog/command-menu.tsx:18–23  ·  view source on GitHub ↗
(e: KeyboardEvent)

Source from the content-addressed store, hash-verified

16
17 useEffect(() => {
18 const handler = (e: KeyboardEvent) => {
19 if (e.key.toLowerCase() === "k" && (e.metaKey || e.ctrlKey)) {
20 e.preventDefault();
21 setOpen((o) => !o);
22 }
23 };
24 window.addEventListener("keydown", handler);
25 return () => window.removeEventListener("keydown", handler);
26 }, []);

Callers 1

handleResizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected