GNOME Bugzilla – Bug 681735
On-screen keyboard layout does not update
Last modified: 2019-02-27 19:55:12 UTC
I have several keyboard layouts enabled though System Settings. When I switch between them, the layout of the on-screen keyboard stays the same. It should probably update to reflect the keyboard layout that is in use. This is particularly necessary for users of some input sources.
(In reply to comment #0) > I have several keyboard layouts enabled though System Settings. When I switch > between them, the layout of the on-screen keyboard stays the same. It should > probably update to reflect the keyboard layout that is in use. Right, and there is definitively a shell bug involved here. Still, it seems worth pointing out that the OSK only supports a hand-full of layouts (that is, if you cut off two fingers) and falls back to en_US for everything else ...
To fix this problem we need to create qwerty.xml file for each language. Right now caribou supports arabic and hibru language. May be we need to raise translation kind of request for each language.
Caribou takes keys from "locale_name.xml" . This xml file contains key mapping from "gtk+-2/gdk/gdkkeysyms.h" gdkkeysyms.h contains entries from http://cgit.freedesktop.org/xorg/proto/x11proto/plain/keysymdef.h Surprisingly it does not have support for Indic scripts.
I think there are two separate issues. One is, since GNOME 3.6, switching XKB layouts updates the XKB group configuration (e.g. group0 = "jp", group1 = "us", etc.), while caribou and gnome-shell osk assume that the configuration is fixed during the session. Another is, as already pointed out, there are only a few layouts defined in caribou. For the former, I've filed a patch to caribou (bug 694011), though gnome-shell osk also needs to be aware of the configuration change. For the latter, I'm working on a branch (not rebased yet) to use xkbfile data as a fallback: http://git.gnome.org/browse/caribou/log/?h=wip/xkbfile
Created attachment 236520 [details] [review] keyboard: track XKB group configuration change Since GNOME 3.6, switching XKB layouts changes the group configuration. This patch tries to track group configuration changes and reconstruct UI as needed. See also caribou bug#694011.
comment 5 is a patch for gnome-shell. To test, add "English (US)" and "Arabic" input sources and switch between them.
(In reply to comment #4) > For the latter, I'm working on a branch (not rebased yet) to use xkbfile data > as a fallback: > http://git.gnome.org/browse/caribou/log/?h=wip/xkbfile Do you have a bug opened for that? Personally, I'd like to see layouts were created programmatically so that they could be tweaked and refined, rather than having the choice between creating something completely by hand, or using a fallback with extraneous keys. Say: caribou-create-layout --type=touch fr and then modify the created file. This would allow populating the database with high-quality layouts. We'd also need some guidelines as to which keys should be included by default, so that the layouts are consistent.
Review of attachment 236520 [details] [review]: This is fine but we need to add a check for caribou in configure.ac. It's actually a bug that we haven't been doing it until now since the shell doesn't even start if it can't find the caribou typelib. We'll have to check for caribou > 0.4.8 at least to be sure we have the new signals that this patch depends on. I'll mark this patch a-c-n but we can't push it until you push the caribou patch of course.
Comment on attachment 236520 [details] [review] keyboard: track XKB group configuration change Thanks for the review, added caribou-1.0 >= 0.4.8 check. Attachment 236520 [details] pushed as 824fbe0 - keyboard: track XKB group configuration change
Is this fixed now?
Created attachment 236905 [details] [review] keyboard: destroy actors when a group is removed We can't reuse key actors since signals connected to them are associated to the original group object. Fix of commit 824fbe09c2a4f59b009a3dd57d40ec752c2efc89. -- Sorry, it turned out a fix is needed, for the case when a group is added more than once.
(In reply to comment #10) > Is this fixed now? Just for the 'us', 'ara' and 'il' layouts, i.e. the ones that caribou has touch layout definitions for.
Review of attachment 236905 [details] [review]: Oh, indeed. Bummer that we can't optimize this but it shouldn't be that bad.
Comment on attachment 236905 [details] [review] keyboard: destroy actors when a group is removed Attachment 236905 [details] pushed as a8f9871 - keyboard: destroy actors when a group is removed
FWIW, I can still reproduce this on current Debian unstable (GNOME Shell 3.22.3-3, caribou 0.4.21-1+b1): I have en-us and French (alternative) layouts configured via GNOME settings, and the OSK is always QWERTY.
Fixed by the new OSK in 3.30.