I am experiencing a bug. I am using Ubuntu GNOME 17.10 18.04 (see edit below), currently under Wayland (but the bug was already there a few years ago, under Xorg).
I have got two keyboard layouts enabled : Switzerland's French layout and Switzerland's German layout. Basically, there are only 3 keys which differ from another : éàè in French, and öäü in German. Note that the French layout is a variant from the German layout, which is default in Switzerland. Both are defined in the same file.
The issue is that sometimes, when the French keyboard layout is apparently selected, I am typing with the German layout (I only notice it when I use those 3 differing keys). In order to fix that, I have to switch to the German layout and back again. This does not happen every day and I am living with it for a long time.
What could be the cause ? How to fix it ?
PS : I unfortunately don't know which logs I could possibly provide. Comment that and I'll add them. Thanks in advance !!
--
Edit : Since Ubuntu 18.04, behaviour changed : I frequently end up writing with the France's French AZERTY layout, which I haven't even selected or enabled. Thus, I add the 18.04
flag to this question, that seems fair to me.
Maybe is it worth saying that Ubuntu does not support Switzerland's French language variety (why?). It only supports the Canadian and the French varieties of French, so I was always obliged to choose the France's French language. But the displaying language is supposed to have nothing to do with the choosen keyboard layout(s).
So I show you the result of the command locale
. That may help (?)
LANG=fr_FR.UTF-8
LANGUAGE=fr_FR:fr_CA:en
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC=fr_CH.UTF-8
LC_TIME=fr_CH.UTF-8
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY=fr_CH.UTF-8
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER=fr_CH.UTF-8
LC_NAME=fr_CH.UTF-8
LC_ADDRESS=fr_CH.UTF-8
LC_TELEPHONE=fr_CH.UTF-8
LC_MEASUREMENT=fr_CH.UTF-8
LC_IDENTIFICATION=fr_CH.UTF-8
LC_ALL=
--
Edit : Here are the results of following commands : cat /etc/default/keyboard
:
XKBLAYOUT=ch,ch
BACKSPACE=guess
XKBVARIANT=fr,
and gsettings get org.gnome.desktop.input-sources sources
:
[('xkb', 'ch+fr'), ('xkb', 'ch')]
and gsettings get org.gnome.desktop.input-sources per-window
:
false
--
Important edit : If I change the language of my laptop from France's French to Canadian French, keeping my Swiss layout, I end up, after a while, writing with the Canadian keyboard layout.... Even if I haven't it enabled...
To avoid switching the keyboard layout you could also search for one that can do all the characters you need and get used to that. I changed to Spanish (Latin America) layout and it can do éàè and öäü, even the ß used in Germany.