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

Function onKey

web/components/mobile/BottomSheet.tsx:42–44  ·  view source on GitHub ↗
(e: KeyboardEvent)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected