(event: KeyboardEvent)
| 92 | // Adds a keyboard shortcut to toggle the sidebar. |
| 93 | React.useEffect(() => { |
| 94 | const handleKeyDown = (event: KeyboardEvent) => { |
| 95 | if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) { |
| 96 | event.preventDefault() |
| 97 | toggleSidebar() |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | window.addEventListener("keydown", handleKeyDown) |
| 102 | return () => window.removeEventListener("keydown", handleKeyDown) |
nothing calls this directly
no outgoing calls
no test coverage detected