-
-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: some shortcuts not working on different langs
Different keyboard layouts (e.g. Russian). `event.key` gives you the printed character and not the key code. If the language doesn't use latin letters, you'll never get Ctrl + N or Ctrl + K to work. This behavior aligns with e.g. Telegram, and browsers (Ctrl + W). There is a side-effect, however. The shortcuts cheat-sheet shows which buttons you're currently pressing, and now it diverges from actual behavior. E.g. if you actually press the key with the code "Comma", it won't show you this for the Russian language where the key to print a comma is different. See `KeyboardShortcutHint.tsx`. I think this can be fixed later, especially that it's already buggy: it won't show you that you're pressing "N" because you'd actually need to press "Shift+N", otherwise you get "n".
- Loading branch information
Showing
2 changed files
with
24 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters