After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 681735 - On-screen keyboard layout does not update
On-screen keyboard layout does not update
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: keyboard
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on: 694011
Blocks:
 
 
Reported: 2012-08-13 09:14 UTC by Allan Day
Modified: 2019-02-27 19:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
keyboard: track XKB group configuration change (4.37 KB, patch)
2013-02-18 03:05 UTC, Daiki Ueno
committed Details | Review
keyboard: destroy actors when a group is removed (1.18 KB, patch)
2013-02-20 10:19 UTC, Daiki Ueno
committed Details | Review

Description Allan Day 2012-08-13 09:14:11 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.
Comment 1 Florian Müllner 2012-08-13 10:36:50 UTC
(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 ...
Comment 2 anish 2012-09-07 12:28:11 UTC
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.
Comment 3 anish 2012-09-07 14:32:12 UTC
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.
Comment 4 Daiki Ueno 2013-02-17 08:44:36 UTC
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
Comment 5 Daiki Ueno 2013-02-18 03:05:35 UTC
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 6 Daiki Ueno 2013-02-18 03:13:37 UTC
comment 5 is a patch for gnome-shell.  To test, add "English (US)" and "Arabic" input sources and switch between them.
Comment 7 Bastien Nocera 2013-02-18 09:33:28 UTC
(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.
Comment 8 Rui Matos 2013-02-18 12:33:42 UTC
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 9 Daiki Ueno 2013-02-18 15:34:31 UTC
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
Comment 10 Matthias Clasen 2013-02-19 22:53:27 UTC
Is this fixed now?
Comment 11 Daiki Ueno 2013-02-20 10:19:49 UTC
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.
Comment 12 Rui Matos 2013-02-20 10:23:14 UTC
(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.
Comment 13 Rui Matos 2013-02-20 10:33:37 UTC
Review of attachment 236905 [details] [review]:

Oh, indeed. Bummer that we can't optimize this but it shouldn't be that bad.
Comment 14 Daiki Ueno 2013-02-20 13:40:30 UTC
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
Comment 15 intrigeri 2017-06-29 07:47:56 UTC
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.
Comment 16 Florian Müllner 2019-02-27 19:55:12 UTC
Fixed by the new OSK in 3.30.