(event: globalThis.KeyboardEvent)
| 588 | requestAnimationFrame(() => window.dispatchEvent(new Event('cbm:focus-galaxy-search'))); |
| 589 | }; |
| 590 | const onKey = (event: globalThis.KeyboardEvent) => { |
| 591 | if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === 'k') { |
| 592 | event.preventDefault(); |
| 593 | focusGalaxySearch(); |
| 594 | } |
| 595 | }; |
| 596 | window.addEventListener(OPEN_COMMAND_SEARCH_EVENT, focusGalaxySearch); |
| 597 | window.addEventListener('keydown', onKey); |
| 598 | return () => { |
nothing calls this directly
no test coverage detected