I'm trying to make a custom keyboard variant for Ubuntu 17.10 with default gnome (Xorg).
In file /usr/share/X11/xkb/symbols/be I added the text below:
partial alphanumeric_keys
xkb_symbols "r03" {
include "be(basic)"
name[Group1]="Belgian (r03)";
key <TLDE> { [ at, threesuperior, onesuperior, lessthanequal ] };
};
There will be more changes, but this is a test. The key above tab should be '@'.
(My complete layout is available here: https://github.com/roelandmoors/azerty#installing-on-linux)
I also changed /usr/share/X11/xkb/rules/evdev.xml to add this new variant to the 'be' layout:
<variant>
<configItem>
<name>r03</name>
<description>Belgian (r03)</description>
</configItem>
</variant>
The folder /var/lib/xkb only contains a readme.
When I use setxkbmap -layout be -variant r03
the new keymap seems to work fine.
The problem is that I can't select the new variant when I run sudo dpkg-reconfigure keyboard-configuration
. In the gnome settings I can't even select a variant. I tried with the dconf editor to change /org/gnome/desktop/input-sources/sources
to [('xkb', 'be+r03')]
but then I get a querty layout instead of azerty. (fallback if settings is wrong?)
How can I make my new layout selectable in the settings. I want this as my default keyboard layout (also in gdm).
Update:
I got sudo dpkg-reconfigure keyboard-configuration
working, but it is very uggly. (don't do it, just edit /etc/default/keyboard)
Copy the output of this command:
sudo /usr/share/console-setup/kbdnames-maker /usr/share/console-setup/KeyboardNames.pl | grep r03
I should be something like this: C*variant*be*r03*Belgian - Belgian (r03)
Then add this line to this file: (search for similar lines)
sudo vi /var/lib/dpkg/info/keyboard-configuration.config
Now you can select the new variant in dpkg-reconfigure keyboard-configuration
.