MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / onKey

Function onKey

graph-ui/src/galaxy/GalaxyPanel.tsx:1315–1320  ·  view source on GitHub ↗
(event: globalThis.KeyboardEvent)

Source from the content-addressed store, hash-verified

1313 useEffect(() => {
1314 if (!trailView || escapeTaken) return;
1315 const onKey = (event: globalThis.KeyboardEvent): void => {
1316 if (event.key !== 'Escape' || event.defaultPrevented) return;
1317 if (isTypingTarget(event.target instanceof Element ? event.target : null)) return;
1318 event.preventDefault();
1319 clearTrail();
1320 };
1321 window.addEventListener('keydown', onKey);
1322 return () => window.removeEventListener('keydown', onKey);
1323 }, [trailView, escapeTaken, clearTrail]);

Callers

nothing calls this directly

Calls 2

isTypingTargetFunction · 0.90
peekNavigationFunction · 0.90

Tested by

no test coverage detected