What are the steps to setting up a custom keyboard layout in X11 without root access? I know it's possible, based on this answer, but I get Error loading new keyboard description
whenever I try using my new layout.
In .config
I have created a xkb
directory as follows:
xkb/
rules/
evdev-local
evdev-local.lst
evdev-local.xml
symbols/
my-us
In my evdev-local.xml
in the <layoutList>
section I added
<layout>
<configItem>
<name>my-us</name>
<shortDescription>my-us</shortDescription>
<description>English (My US)</description>
<languageList>
<iso639Id>eng</iso639Id>
</languageList>
</configItem>
<variantList>
<variant>
<configItem>
<name>mdvp</name>
<description>English (Modified Programmer Dvorak)</description>
</configItem>
</variant>
</variantList>
</layout>
and the symbols/my-us
file is
partial alphanumeric_keys
xkb_symbols "mdvp" {
include "us(dvp)"
name[Group1] = "English (Modified Programmer Dvorak)";
// Unmodified Shift AltGr Shift+AltGr
// upper row, left side
key <AD01> { [ apostrophe, quotedbl, dead_acute, dead_diaeresis ] };
// lower row, left side
key <AB01> { [ semicolon, colon, dead_ogonek, dead_doubleacute ] };
include "level3(ralt_switch)"
};
I then run
setxkbmap -I ~/.config/xkb/ -rules evdev-local -layout my-us
and get
Error loading new keyboard description
Back story: I've been using Programmer's Dvorak, and I like it for the most part, but I want to switch the semicolon and apostrophe back to their positions on US Dvorak, since that works better for my workflow.
I have seen this tutorial recommended on SE, and it works on my machine, but I need to be able to use the KDE layout switcher widget so I can switch back to plain English QWERTY when someone else needs to work on my machine.
setxkbmap -print
afterward, this will not show the right settings ! In my case I really need thesetxkbmap
settings to be modified :( – rambi Jul 15 '21 at 11:57