A note on keyboard accelerators in non-Latin scripts

Andriy Rysin arysin at gmail.com
Sun Jun 15 00:16:36 BST 2008

Let me just add it in the way I observed it and correct me if I am wrong.
Let's say I have three layouts (groups) configured: US, US(dovrak) and UA

1. In GTK the accelerator is searched in all layouts starting from
current one looping if needed, i.e.:
a) current is US and Ctrl+P (standard US keyboard) is pressed in gedit
Print dialog will be open
b) current is US(dvorak) and Ctrl+P is pressed  (actual for dvorak:
Ctrl+L) in gedit Open Location dialog will be open
c) current is UA and Ctrl+P is pressed in gedit Print dialog will be
open - no accelerator for Ctrl+cyrillic 'З' so the search will loop to
US thus result is indentical to a)

2. in KDE4/Qt4 the accelerator search is always pefrormed in layout
(group) 0, thus no matter what current layout is, the acceleators will
always be called in my case for US layout, if you make Dvorak default,
i.e. US(dvorak)+US+UA the accelerators will always be called for
dvorak keys and if I make UA the first layout no (standard)
accelerators will work at all...

So my summary for KDE4/Qt4 will be a slightly different from yours:
1. currently non-latin users are ok as long as they:
a) put latin layout as default
b) have all of their accelerators in latin keys from defaut layout

2. multi-latin layout users are screwed only if they expect
accelerator keys to follow layout switching, or they can be fine if
they follow recipe for non-latin layout users from 1.

P.S. interestingly enough if I try to define new accelerator e.g. in
kwrite with Ctrl+ it takes different path:
1) current layout, if not latin char then:
2) default layout, if not latin char then:
3) cycle through the rest of layouts, if no latin char for this key is found
4) use non-latin (cyrillic in my case) from current layout
This applies to modifier-accelerators, i.e. with Ctrl+, while if I
just use non-modifier key or Alt+ non-latin is taken - quite confusing

P.P.S. and if I don't have latin layout - just non-latin ones (quite
unrealistic situation in real world though) non-latin accelerators can
be defined with Ctrl+ and they work pretty well :)

2008/6/14, Chusslove Illich <caslav.ilic at gmx.net>:
> The recent topic on autogenerating accelerators prompted me to write a
> little something directly on this topic (mentioned the issue briefly in
> another thread, about two years ago...) I don't really expect a favorable
> resolution, but at least to make a clear statement, for my conscience
> sake :)
> The bottom line is: non-Latin keyboard accelerators (Cyrillic, Greek,
> Hebrew, Arabic, perhaps some other) are pretty much useless in KDE.
> A native user of non-Latin script has to spend greater part, if not most of
> the time, having a Latin (usually en_US) keyboard layout selected:
> communicating in English, typing in addresses, file names, shell stuff
> (anything "the computer" should understand), etc. Thus, if such user is
> working in non-Latin localized KDE, most of the time keyboard accelerators
> are not usable. Even if such user is using non-localized KDE, when typing in
> native language accelerators are again out of reach. Hence the bottom line
> above. (And probably the reason why noone bother to complain about missing
> auto-assigned accelerators...)
> There's a simple and demonstrated solution to this, if not with a caveat.
> For a long time, GTK is doing the following: it doesn't blindly accept the
> character, but rotates characters with the same keysum in all set keyboard
> layouts, until one matches an accelerator. Since the Latin and non-Latin
> layouts are disjunct by characters admissible as accelerators (letters), it
> works flawlessly. It also works, by virtue of not being applicable, for a
> native Latin user who uses a single Latin layout.
> However, the rotate-by-keysum leads to a disaster when a user uses two Latin
> layouts. Since accelerator sets are no longer disjunct by layout, the
> behavior is unpredictable. Think e.g. of A/Q in AZERTY and QWERTY. Woes on
> this in Gnome: http://bugzilla.gnome.org/show_bug.cgi?id=162726
> So there it is. Single layout users are happy no matter what; many non-Latin
> KDE users are screwed right now, whereas the rotate-by-keysum would screw a
> number of multiple Latin layout users. If anyone has an idea how to have the
> cake and eat it (which obviously has to be acceptable for Qt), please...
> --
> Chusslove Illich (Часлав Илић)

More information about the kde-core-devel mailing list