greena13 / react-hotkeys

Declarative hotkey and focus area management for React
https://github.com/greena13/react-hotkeys
ISC License
2.15k stars 160 forks source link

[BUG] hotkeys are not working, when registering custom document 'keydown'/'keyup' events #253

Open erik-sytnyk opened 4 years ago

erik-sytnyk commented 4 years ago

Describe the bug when registering custom document 'keydown'/'keyup' events, hotkeys are not working

          ...
          document.addEventListener('keydown', this.trackingKeyPress, true);
          document.addEventListener('keyup', this.trackingKeyOut, false);

used to work in 1.x version

How are you using react hotkeys components? (HotKeys, GlobalHotKeys, IgnoreKeys etc) hotkeys Expected behavior Should work as in the previous version or it should be mentioned in version upgrade document

Platform (please complete the following information):

greena13 commented 4 years ago

Thanks for posting your issue.

Unfortunately I do not have the time to actively work on this package, but I am seeking other active maintainers. If you are willing to create a pull request or help out, that would be an excellent way of moving this forward.