is-hotkey icon indicating copy to clipboard operation
is-hotkey copied to clipboard

Modifier keys not identified on keyup events

Open ablamunits opened this issue 3 years ago • 0 comments

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.

ablamunits avatar Apr 21 '21 13:04 ablamunits