Hi Gunnar !
Summary: I report which layout I get with various combinations of locale and
user and system configurations. Perhaps importantly, I also found that when I
switch layout using the keyboard shortcut that I configured (pressing the two
shift keys), I do not get the same result as if I select the same layout using
the mouse in the menu bar!
I tried multiple combinations of configurations. To describe them easily, I
will call "user layout" the value of "layout" in
~/.config/mozc/ibus_config.textproto, which for instance is "jp"
in the example below:
cat ~/.config/mozc/ibus_config.textproto
engines {
name : "mozc-jp"
longname : "Mozc"
layout : "jp"
}
layout : "jp"
And I will call "system layout" the value of "<layout>" in the
file /usr/share/ibus/component/mozc.xml, which for instance is "jp"
in the example below.
cat /usr/share/ibus/component/mozc.xml
<component>
<name>com.google.IBus.Mozc</name>
<description>Mozc Component</description>
<exec>/usr/lib/ibus-mozc/ibus-engine-mozc --ibus</exec>
<version>2.26.4220.100+dfsg-4</version>
<author>Google Inc.</author>
<license>New BSD</license>
<homepage>https://github.com/google/mozc</homepage>
<textdomain>ibus-mozc</textdomain>
<engines exec="/usr/lib/ibus-mozc/ibus-engine-mozc --xml" />
<layout>jp</layout>
</component>
As I write this, I have "jp" in both my user and system layout, and
LANG=fr_FR.UTF-8, LANGUAGE= and LC_ALL= in my environment. My three layouts
are Japanese (Mozc), Japanese and Canadian multilingual. `gsettings get
org.gnome.desktop.input-sources sources` indicates: [('ibus', 'mozc-jp'),
('xkb', 'jp'), ('xkb', 'ca+multix')]. However, when I select the xkb jp
layout, the keyboard types in canadian layout. The two other layouts
give the expected result.
As I reported earlier, when the user and system "layout" values are "default",
and my locale is fr_FR.UTF-8, then when I select the Mozc layout my keyboard
sometimes in types in azerty layout, which I have configured nowhere. Today
I found that this only happens if I switch to the layout via the keyboard
shortcut (here: shiftL + shiftR). If I switch layout using the mouse and the
GNOME menu bar, the Mozc layout is the same as the previously selected keyboard
(either Japanese or Canadian multilingual).
Here is a summary of various combinations of configurations that I tested. Too
be frank, using the fr_CA.UTF-8 is fine with me as a workaround. My main
motivation with this report is that in the default configuraiton, having the
French azeerty layout picked despite it is nowhere in the configuraiton is
clearly a bug.
user system locale problem
---- ------ ------ -------
default default fr_FR.UTF-8 ibus mozc-jp layout is sometimes French azerty
and sometimes Canadian
default default fr_CA.UTF-8 fr_CA.UTF-8 is in principle the wrong locale.
jp jp fr_FR.UTF-8 xkb jp layout is Canadian
jp jp fr_CA.UTF-8 xkb jp layout is Canadian
jp default fr_CA.UTF-8 xkb jp layout is Canadian
jp default fr_FR.UTF-8 xkb jp layout is Canadian
default jp fr_FR.UTF-8 xkb jp layout is Canadian
default jp fr_CA.UTF-8 xkb jp layout is Canadian
Have a nice week-end !
--
Charles