Automattic / Automattic/simplenote-electron

Hotkeys don't work as expected if keyboard is set to non-latin languages.

Open
#2,782 3 comments 0 reactions 0 assignees View on GitHub
[feature] shortcuts [OS] macOS [OS] windows bug i18n
Dominant language
TypeScript
Stars
5.3k
Forks
588
Avg merge
9h 45m
Merged PRs (30d)
4

Description

Reported on 3818073-zen

Some hotkeys seem to not work if the keyboard is set to a non-latin language, but they do work if the key mapping is set to English. In this case the user reported the problem for Cyrillic in Windows, but I was able to replicate it as well for Thai in OSX.

I wonder if this could be related to using the latin convention rather than the keyboard key code value, when checking [diffs like this one](https://github.com/Automattic/simplenote-electron/pull/2041/files#diff-c986263723258fcc3a1d6b516a991a83dd069a3e07a4af188693ff293af6f340R171) , at `cmdOrCtrl && 'KeyT'`

### Expected
That hotkeys behave equal despite the keyboard layout/language used.

### Observed
This behaves differently, when layout is set to Cyrillic some hotkeys work (Ctrl + Shift + I) , but other doesn't, like:

- Ctrl+/ Show keyboard shortcuts
- Ctrl+Shift+U Toggle tag list
- Ctrl+Shift+K Open note above current one, in Cyrilic works like Backspace
- Ctrl+Shift+J Open note below current one
- Ctrl+Shift+Y Toggle editing content/tags
- Ctrl+Shift+L Toggle note list (on narrow screens)
- Ctrl+Shift+P Toggle Markdown preview

### Reproduced

I don't have a Windows machine in order to replicate this specific case, but I replicated the same behaviour for the OSX version, for example in Thai I cannot use cmd+L move focus to search field, while this works if my keyboard is set to Spanish or English.

Details as per the specific user problem:

- OS: Windows
- OS version: 10
- Simplenote app version: 2.7.1

Contributor guide

Open the contributing guide

Research direction

Start with the hotkey checks referenced in the linked PR diff, including the `cmdOrCtrl && 'KeyT'` expression, and trace how keyboard layout values are handled on Windows and macOS. Reproduce the listed shortcuts with Cyrillic or Thai layouts, then verify that each expected shortcut behaves the same as with English or Spanish layouts.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, typescript
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.