Set non-US keymap
I have got a machine with Swiss German keyboard layout, thus want a keymap that is appropriate.
But I just hate having my whole system in German, so I set all my locales in British English:
Now to have my keymap set to Swiss German, I edit my rc.conf
I chose one of the keymaps from
Alright, now we have got it working in a non-X (TTY) environment.
As expected, after firing up X, openbox still uses the US keymap.
Ok, you can always set the keymap manually with setxkbmap, but it gets annoying, since it is only valid for the current session.
setxkbmap -layout ch
Yeah, we could easily write a startup script that does exactly that before running your WM, e.g. adding the following at the end of the autostart.sh file of Openbox:
(sleep 2 && setxkbmap -layout ch) &
But there are reported issues when resuming after suspending the machine.
So as to make this change really persistent, it is best to set your keymap globally and independently in the Xorg config files.
In my case, I just added an Option in /etc/X11/xorg.conf
Identifier “evdev keyboard catchall”
Option “XkbLayout” “ch”
(Before upgrading to Xorg 1.8, i.e. when HAL was still used, you were encouraged to edit /etc/hal/fdi/policy/10-keymap.fdi to set up your keybindings rather than doing this via X).