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

Function onKeyDown

graph-ui/src/App.tsx:3689–3708  ·  view source on GitHub ↗
(event: globalThis.KeyboardEvent)

Source from the content-addressed store, hash-verified

3687 */
3688 useEffect(() => {
3689 const onKeyDown = (event: globalThis.KeyboardEvent): void => {
3690 const target = event.target as Element | null;
3691 const shortcut = menuShortcutFor(event, target, WIRED_MENU_SHORTCUTS);
3692 if (shortcut !== undefined) {
3693 const act = menuActionsRef.current[shortcut];
3694 if (act !== undefined) {
3695 event.preventDefault();
3696 markHandled(event, shortcut);
3697 act();
3698 }
3699 return;
3700 }
3701 const guard = keyboardGuardRef.current;
3702 if (guard.overlayOpen) {
3703 return;
3704 }
3705 if (guard.walkRunning && playerIntent(event.key) !== 'none') {
3706 return;
3707 }
3708 };
3709 window.addEventListener('keydown', onKeyDown, KEY_LISTENER_OPTIONS);
3710 return () => window.removeEventListener('keydown', onKeyDown, KEY_LISTENER_OPTIONS);
3711 }, []);

Callers

nothing calls this directly

Calls 6

menuShortcutForFunction · 0.90
markHandledFunction · 0.90
playerIntentFunction · 0.90
tourKeyForEventFunction · 0.90
stepMoveFunction · 0.90
isLastStepFunction · 0.90

Tested by

no test coverage detected