Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve non-latin menu items hot keys handling #99

Open
unxed opened this issue Mar 29, 2023 · 2 comments
Open

Improve non-latin menu items hot keys handling #99

unxed opened this issue Mar 29, 2023 · 2 comments

Comments

@unxed
Copy link
Contributor

unxed commented Mar 29, 2023

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:

  1. 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 "Ф").

  2. 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

@magiblot
Copy link
Owner

magiblot commented Mar 29, 2023

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 (latin A) trigger a ~Ф~айл menu entry?
  • Does Alt+F (latin F) trigger a ~Ф~айл menu entry?
  • Does Alt+У trigger an ~E~dit menu entry?
  • Does Alt+Е (cyrillic Е) trigger an ~E~dit menu entry?

Thank you.

@unxed
Copy link
Contributor Author

unxed commented Mar 31, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants