hotkeys-js
hotkeys-js copied to clipboard
Cmd-backslash doesn't work on a non-US keyboard layout
My Czech keyboard layout has the backslash (\) in the lower left corner of the keyboard:
This is different from U.S. English layout on the ISO keyboard which looks like this:
When I go to this project's homepage with my Czech keyboard, the backslash alone is registered:
But when I try Cmd-\, only Cmd alone is registered:
That means that Cmd-\ shortcuts are not working. Is there a way to fix this?
https://github.com/jaywcjlove/hotkeys/blob/98ce2d6fb6d8100b7f98470f92d095cc147ac141/src/var.js#L34-L37
@borekb May be a problem with escape characters.
Interestingly, on https://keycode.info/, I get the key code 220 (correct) but event.code is IntlBackslash instead of Backslash. Is this related?
@borekb This is right.
@jaywcjlove but what to do about it? Hotkeys.js receives the correct code but still doesn't work correctly; would it need to be reworked to take event.code into account?
@borekb I need to debug it.
Hi @jaywcjlove , I wrote a bit about it here, tried hotkeys also and to see if it worked
https://kevinsimper.medium.com/why-keyboard-shortcuts-and-accessibility-in-other-keyboard-languages-rarely-works-8638abc15e71