MCPcopy Create free account
hub / github.com/MagicCube/agentara / handleKeyDown

Function handleKeyDown

web/src/components/ui/sidebar.tsx:98–106  ·  view source on GitHub ↗
(event: KeyboardEvent)

Source from the content-addressed store, hash-verified

96 // Adds a keyboard shortcut to toggle the sidebar.
97 React.useEffect(() => {
98 const handleKeyDown = (event: KeyboardEvent) => {
99 if (
100 event.key === SIDEBAR_KEYBOARD_SHORTCUT &&
101 (event.metaKey || event.ctrlKey)
102 ) {
103 event.preventDefault();
104 toggleSidebar();
105 }
106 };
107
108 window.addEventListener("keydown", handleKeyDown);
109 return () => window.removeEventListener("keydown", handleKeyDown);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected