Description
Power users and developers prefer keeping their hands on the keyboard. We should add a global Ctrl+K (or Cmd+K on Mac) shortcut to instantly open the search modal.
Proposed Solution
- Add a global event listener for the
keydown event.
- Check if
(event.ctrlKey || event.metaKey) && event.key === "k".
- If true, prevent the default browser behavior and toggle the Search Modal state to open.
- Ensure the search input is automatically focused when the modal opens.
Expected Outcome
A faster, more accessible search experience mimicking tools like Vercel and GitHub.
Description
Power users and developers prefer keeping their hands on the keyboard. We should add a global
Ctrl+K(orCmd+Kon Mac) shortcut to instantly open the search modal.Proposed Solution
keydownevent.(event.ctrlKey || event.metaKey) && event.key === "k".Expected Outcome
A faster, more accessible search experience mimicking tools like Vercel and GitHub.