jaywcjlove / hotkeys-js

➷ A robust Javascript library for capturing keyboard input. It has no dependencies.
https://jaywcjlove.github.io/hotkeys-js
MIT License
6.66k stars 410 forks source link

Add getAllKeyCodes method to API #439

Closed lokeshpathrabe closed 1 year ago

lokeshpathrabe commented 1 year ago

Add a new method to get list of all the registered codes from _handlers object. This was also raised in #223 way back. Though the workaround could work I think this could be pretty useful to display something like a map of hotkeys on a application.

jaywcjlove commented 1 year ago

@lokeshpathrabe Thanks a lot for your contribution.

Modify the getAllKeyCodes method, compile and generate less code, and be compatible with older browsers