On Mac "option" key modifies the resulted event.key value (s becomes ß) that's why check event.key === 's' doesn't work.
According to mdn's KeyboardEvent: code article we can't fix the bug with event.code === 'KeyS' because on different keyboard layouts symbol will be different.
For example, the code returned is "KeyQ" for the Q key on a QWERTY layout keyboard,
but the same code value also represents the ' key on Dvorak keyboards and the A key
on AZERTY keyboards.
That makes it impossible to use the value of code to determine what the name of the
key is to users if they're not using an anticipated keyboard layout.
So I just added the resulting keys to the whitelist.
Description
PR about hotkeys from here
On Mac "option" key modifies the resulted
event.key
value (s
becomesß
) that's why checkevent.key === 's'
doesn't work. According to mdn's KeyboardEvent: code article we can't fix the bug withevent.code === 'KeyS'
because on different keyboard layouts symbol will be different.So I just added the resulting keys to the whitelist.
Additional context
There is another old PR but with a different fix https://github.com/vuejs/devtools/pull/1993
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).