JohannesKlauss / react-hotkeys-hook

React hook for using keyboard shortcuts in components.
https://react-hotkeys-hook.vercel.app/
MIT License
2.57k stars 113 forks source link

[BUG] cannot trigger hot key when pressing "," (comma). #1123

Closed siyao-polarr closed 6 months ago

siyao-polarr commented 6 months ago

Trying to implement a hot key for when user presses "," the comma key. However, since "," is used to separate multiple hot keys, it seems to be ignored. Cannot find any documentations about how to use the comma key differently.

siyao-polarr commented 6 months ago

found a workaround using splitKey. Would be nice if this is documented better. useHotkeys(",", () => myFunction(), { splitKey: "!" })