MCPcopy Create free account
hub / github.com/Roy3838/Observer / onKey

Function onKey

app/src/components/TutorialDoneModal.tsx:18–18  ·  view source on GitHub ↗
(e: KeyboardEvent)

Source from the content-addressed store, hash-verified

16 useEffect(() => {
17 if (!isOpen) return;
18 const onKey = (e: KeyboardEvent) => { if (e.key === 'Escape') onClose(); };
19 window.addEventListener('keydown', onKey);
20 return () => window.removeEventListener('keydown', onKey);
21 }, [isOpen, onClose]);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected