MCPcopy Create free account
hub / github.com/codeaashu/claude-code / onKey

Function onKey

web/components/mobile/MobileSidebar.tsx:39–41  ·  view source on GitHub ↗
(e: KeyboardEvent)

Source from the content-addressed store, hash-verified

37 useEffect(() => {
38 if (!isOpen) return;
39 const onKey = (e: KeyboardEvent) => {
40 if (e.key === "Escape") onClose();
41 };
42 document.addEventListener("keydown", onKey);
43 return () => document.removeEventListener("keydown", onKey);
44 }, [isOpen, onClose]);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected