Keybindings do not work with non English language
See original GitHub issueCtrl+Z
works fine if i’m using English layout but Russian language does not work.
I guess that does not work because app is listening for key
. I can suggest checking code
property if that’s the case.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Some default shortcuts don't work with non-english layout ...
On a Mac hotkeys doesn't depend on keyboard layout. Every app opens settings with cmd + . (key code 190) independent of chosen...
Read more >Send keyboard shortcut doesn't work for non-English input ...
One of my favorite shortcuts is ALT+S. While doing my work I need send messages in both English and non-English.
Read more >309193 – Keyboard shortcuts doesn't work if non-english ...
Open keyboard settings and put non-english layout before english 2. Open konsole, try Ctrl+Shift+T Actual Results: Nothing Expected Results: ...
Read more >Tkinter hotkeys bindings don't work when a non-english layout ...
Closed 3 years ago. I'm creating a Tkinter-based GUI in Python. I want to let the user interact with the application with hotkeys....
Read more >Keyboard Shortcuts doesn't work when keyboard input ...
I tried to use various hotkey (such as alt+p, ctrl+v) and it works fine when keyboard input language is English but it seems...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
German macOS user (QWERTZ) here. Here’s an example of what I have to use for which feature, despite the help dialog telling me otherwise:
cmd
+ß
option
+-
option
+y
cmd
+ü
cmd
++
… and the list goes on. I’d be grateful for a fix. It would be nice if at least the help dialog would state the correct shortcuts.
the problem with adhering to QWERTY is that in most other languages, all the special characters are on other keys. So if you make a shortcut which involves a special character, it is almost certainly unusable. And unfortunately, there are many shortcuts in Excalidraw that use such keys. I think it would be a good start to move those to “letter keys”. Especially much needed shortcuts like zooming in and out (like
cmd
+i
(for in) andcmd
+o
(for out)). I must admit that this would be quite unusual though. But I’d say better unusual than unusable 😄I think it would be nice if there were a mechanism to switch keyboard layouts.
Hey @mhsattarian. As far as I know, there’s no easy solution to this problem. If we use
code
, we break it for non-QWERTY layout users. If we usekey
, we break it for users with non-latin keyboards.I skimmed the Mozilla blog post and I couldn’t find any recommendation.
From my experience, apps actually have been using
event.which
for the longest time which is similar toevent.code
. Whenevent.key
was introduced it seems to have replaced the “recommended” solution.I don’t know what is worse. If we say “press
A
to use the arrow tool” and the user pressesA
and it does nothing (or the wrong thing) because the layout is different, or the user doesn’t know what key to press or cannot press anything because they use a different alphabet. I’d say the former is worse, because with the latter there’s at least some expectation that it won’t work or explanation why it doesn’t.Alright, this is nice and all, but can we do something about this situation? I think to an extent we can (as I stated in previous comment).
Provided that non-latin keyboards are dual-language, i.e. they have the latin letters printed on they keycaps as well (I believe this is mostly the case), and they adhere to QWERTY (unclear if this is the majority case), then we can detect whether
event.key
is in latin, and if not, fall back toevent.code
.This wouldn’t solve everything for everyone, but I think it would help a lot.
It will require some work and rewriting how we handle the keyboard, though.