Support and documentation for locally installed keyboard layouts
Submitted by Tristan Miller
Assigned to Xorg Project Team
Description
According to the documentation I've been able to find, such as the man page for setxkbmap, the source files for XKB keymaps are located only in /usr/share/X11/xkb. So when users such as myself create a custom keymap for a certain locale, we need to overwrite or append to existing files there (such as /usr/share/X11/xkb/symbols/us for English layouts, /usr/share/X11/xkb/symbols/ru for Russian layouts, etc.).
The problem is that these files get overwritten whenever X.Org is upgraded. Of course, we want to get whatever updates X.Org makes to the other layouts; we just don't want it to overwrite our custom ones.
It would be great if the keymap code in X.Org would follow the Filesystem Hierarchy Standard (FHS) [1] by allowing keymaps to be installed locally under /usr/local/share/X11/xkb. (As the FHS states, "The /usr/local hierarchy is for use by the system administrator when installing software locally. It needs to be safe from being overwritten when the system software is updated.") When X.Org attempts to compile a given keyboard layout (such as via setxkbmap), it should first look for the keymap in /usr/local/share/X11/xkb, and then fall back to /usr/share/X11/xkb if it was not found.
Apologies if I've entered this report for the wrong product—it's not clear whether it belongs here, in libxkbcommon, in xkeyboard-config, or somewhere else.