Closed silverwind closed 1 year ago
This snippet of mousetrap may be helpful.
Here is the same demo with mousetrap, it does not exhibit this issue:
https://codesandbox.io/s/bitter-cache-22rssh?file=/src/index.js
I believe the offending file is browser-bindings.ts, likely to do with the special handling of the Command key. I can't debug this until Friday because I'm away from any mac devices, but will have a look as soon as I can. Thanks for filing the issue @silverwind, it's greatly appreciated.
@silverwind Just published v1.2.1. You should now be able to bind meta/command as you expect, as well as use preventDefault as you expect. Let me know if you run into any more issues. Thanks for raising this issue, it's an important one. 🍻
Thanks, I updated the dependency in https://codesandbox.io/s/gracious-fog-xswpdd?file=/src/index.js, and now it's working as expected and both cmd+s
and ctrl+s
log as expected.
Describe the bug
There seems to be some odd behaviour around the Command and Control keys on Mac:
To Reproduce
control+s
, it's logged correctlymeta+s
(Command+s), it's logged correctlycontrol+s
, it's logged asmeta+s
and subsequent presses no longer log at allExpected behavior These combos to be detected the same way they are entered.