Ha, I might have the perfect solution for you! To sum up: - You can't run at the system level (or even if you could, don't do it, it's less flexible and more cumbersome to set up). - If you redefine a keymap from scratch, you need to use xkbcomp, not setxkbmap! - If you only want to change some modifiers / options over a system keymap, you can use a combination of setxkbmap and xmodmap.
See my dotfiles for an example:
https://github.com/ambrevar/dotfiles
In .xkb, I have defined a new "usim" keymap. The *.xkb file and the
symbols subfoler are mandatory.
To load the map, I call the following from `.xprofile`:
xkbcomp -I"$HOME/.xkb" "$HOME/.xkb/usim.xkb" $DISPLAY 2>/dev/null
I have more settings:
setxkbmap -layout us -variant ""
This resets the keymaps, it's useful when I do some live changes to my
keymap and they I can revert everything by simply sourcing `.xprofile`.
xcape -e 'Control_L=Escape'
Make Left Control (which is Caps Lock in my keymap) act as Escape when
not used as a modifier.
numlockx on
Turn on the numpad by default.
xbindkeys
Set additional keybindings such as the multimedia bindings as par the
`.xbindkeysrc` file.
Hope that helps!
--
Pierre Neidhardt
signature.asc
Description: PGP signature
