Closed AdamMescher closed 3 years ago
User experience could benefit from update to default keyboard shortcut to open the search modal to something that does not conflict with default browser configuration or disabling of default behavior in Chrome and Firefox.
What do TailwindCSS use on Windows as their hotkey?
What do TailwindCSS use on Windows as their hotkey?
Ok, that's interesting 🤔, they use Ctrl + K
but it does not trigger the browser's search behavior...
Let's see how they are doing that.
Ok, i found the piece of code accomplishing this in TailwindCSS, they are using @docsearch/react via algolia and there it is implemented via a simple event.preventDefault()
🠖 PR incoming 👌
OK cool - I'm happy to close based on that
While using a Windows 10 machine [version 19042.906], user attempts to open the "search machines" modal with the
ctrl + k
chord trigger theFocus Address bar for Web Search (writes "? " there)
search shortcut in Firefox (Version 87.0 (64-bit))[1] and theSearch from anywhere on the page
address bar shortcut in Chrome (version 89.0.4389.114) [2]macOS users do not appear to have a similar conflict.
[1] - https://support.mozilla.org/en-US/kb/keyboard-shortcuts-perform-firefox-tasks-quickly [2] - https://support.google.com/chrome/answer/157179?co=GENIE.Platform%3DDesktop&hl=en#zippy=%2Caddress-bar-shortcuts