JohannesKlauss / react-hotkeys-hook

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

Several entries in mappedKeys look suspicious #1153

Closed frouaix closed 3 months ago

frouaix commented 3 months ago

https://github.com/JohannesKlauss/react-hotkeys-hook/blob/fe079b9cbd712f9eb3814fcaf344dc8f660b9bd8/src/parseHotkeys.ts#L5

‘-‘ maps to slash? ‘#’ maps to backslash? ‘+’ maps to bracketright?

In my app (sorry, no standalone repro) ‘alt+-‘ does not trigger as expected on a US qwerty keyboard, ‘alt+minus’ does.

JohannesKlauss commented 3 months ago

Yes, this is a known issue which will be fixed in 5.0.0 Until then you can use the pre release version 5.0.0-1

frouaix commented 3 months ago

Ok - I had a quick look at the new version. I don’t understand how Ctrl-Z can be correctly recognized on a US qwerty keyboard as well as a FR azerty keyboard, but that’s another issue.