Closed eyesplitter closed 1 year ago
@eyesplitter Thank you for the contribution! The code looks good overall, however I found a bug when testing it locally. If a hotkey (say, CMD-b
) is pressed when the form is not in focus it somehow gets "memorized" and triggered when the form gets focus and only the CMD key is pressed.
E.g. to reproduce:
CMD-b
event is firedDemo:
Frankly I'm not sure what's going on, it maybe the bug in the react-hotkeys-hook
library. Perhaps it would be easier to just extend the previous handleKeyDown
approach?
@Aivean
I suppose that was a bug in the react-hotkeys-hook
module.
This behavior works only with the meta key.
So I switched the handler from HotkeysEvent
to KeyboardEvent
and now it works as expected.
Added all hotkeys from #300
All hotkeys work with
ctrl
key for the people who love windows