is-hotkey
is-hotkey copied to clipboard
Modifier keys not identified on keyup events
Hi,
It looks like calling isHotkey(key, event)
on a keyup
event will not identify keys being released when trying to test a modifier key.
You can find an example in the following sandbox: https://codesandbox.io/s/keyup-bug-k41gy?file=/src/index.js
When you press down the mod
key, the value will change to false
. However, releasing the key will not set the value back to true
. This seems to be happening with modifier keys like mod
, cmd
, shift
. However it works as expected with non-modifier keys.