Improve non-latin menu items hot keys handling
unxed opened this issue · 2 comments
Let's imagine we are developing some app with Russian interface. Menu item "File" will be called "Файл" in Russian. The problem is that even if we create it like "~Ф~айл
", hotkey Alt+Ф will work in Russian keyboard layout only. Not very comfortable.
To solve this issue, we need:
-
Some way to assign latin hot keys to non-latin menu items, so "Файл" could get hotkey Alt+A (Latin "A" is on the same key as Russian "Ф").
-
Support terminals that provide keyboard layout independent keystroke information. For now I know 4 terminals that supports this, each utilizing it's own protocol.
a) far2l in "tty extensions" mode, already supported by tvision
b) kovidgoyal's kitty keyboard protocol:
https://sw.kovidgoyal.net/kitty/keyboard-protocol/
c) iTerm2 raw key reporting mode:
https://gitlab.com/gnachman/iterm2/-/issues/7440#note_129307021
d) Windows Terminal
https://github.com/microsoft/terminal/blob/main/doc/specs/%234999%20-%20Improved%20keyboard%20handling%20in%20Conpty.md
microsoft/terminal#6309
Hi @unxed!
First of all, I would like to find out how GUIs behave in this case, and whether it would be desirable to mimic the behaviour of GUIs, or if it would be clearly better to do something else.
Therefore, since you are a regular user of the Russian keyboard layout, I would be very grateful if you could gather the following information from different application types (Qt, GTK, Windows...):
- Does
Alt+Ф
trigger a~Ф~айл
menu entry? - Does
Alt+A
(latinA
) trigger a~Ф~айл
menu entry? - Does
Alt+F
(latinF
) trigger a~Ф~айл
menu entry? - Does
Alt+У
trigger an~E~dit
menu entry? - Does
Alt+Е
(cyrillicЕ
) trigger an~E~dit
menu entry?
Thank you.
GTK (Nemo app):
Does Alt+Ф trigger a ~Ф~айл menu entry?
Yes
Does Alt+A (latin A) trigger a ~Ф~айл menu entry?
Yes
Does Alt+F (latin F) trigger a ~Ф~айл menu entry?
No
Does Alt+У trigger an ~E~dit menu entry?
Yes
Does Alt+Е (cyrillic Е) trigger an ~E~dit menu entry?
No
Qt (qBittorrent app):
Does Alt+Ф trigger a ~Ф~айл menu entry?
Yes
Does Alt+A (latin A) trigger a ~Ф~айл menu entry?
No
Does Alt+F (latin F) trigger a ~Ф~айл menu entry?
No
Does Alt+У trigger an ~E~dit menu entry?
Yes
Does Alt+Е (cyrillic Е) trigger an ~E~dit menu entry?
No
Windows (notepad++ app*)
* tested in Wine as not having Windows at hands right now
Does Alt+Ф trigger a ~Ф~айл menu entry?
No (but Alt+Shift+Ф does**)
Does Alt+A (latin A) trigger a ~Ф~айл menu entry?
No (but Alt+Shift+A does**)
Does Alt+F (latin F) trigger a ~Ф~айл menu entry?
No
Does Alt+У trigger an ~E~dit menu entry?
No
Does Alt+Е (cyrillic Е) trigger an ~E~dit menu entry?
No
** It seems that the hotkeys of the Russian-language menu have case sensitivity:
where hotkeys are assigned to a lowercase character, Shift is not required.
But maybe a Wine bug.
I would call the GTK behavior the most convenient and intuitive.