Description
Environment
- Operating System: Windows 11
- Browsers: Firefox, Chrome (latest for each)
Is this bug related to Nuxt or Vue?
Nuxt
Version
v3.x (docs)
Reproduction
On Windows 11, hitting windows key + k
, per the docs for meta_k
when using defineShortcuts
, which is what looks like the search command palette on the docs is using, does not get passed into the website itself (or even the browser). I've tried ctrl and other keybinds with no success either.
I've tested on both Chrome and Firefox, neither work.
Description
Using the following javascript in the browser console on each:
window.addEventListener("keydown", function (event) {
console.log(event)
})
window.addEventListener("keyup", function (event) {
console.log(event)
})
A few things I notice:
- Holding Windows key (
meta
) does trigger the keydown event, but pressingk
, Windows intercepts, and doesn't trigger a keydown event. Assume this is because Windows 10 or 11 is intercepting for this "cast" feature (below). - Pressing
k
first, then Windows key (meta
), both trigger keydown, but neither trigger keyup.k
triggers keydown, but then Windows key (meta
) doesn't.
Additional context
tl;dr: probably easiest to support ctrl+k
. ctrl+f
is typical for basic browser text search, so ctrl+k
makes the most sense (and it's what most sites use). I've never seen sites use windows keys for anything, because it's meant for windows functionality. Alternatively, supporting /
would be nice, some sites use this.
Not critical, just the keybind to search docs faster. Plus, the search icon is so small in the docs navbar that I often misclick when trying to search the docs.