Wed, 08 Mar 2006
My laptop has a Swiss German keyboard, and it runs Debian. It also has a Caps Lock key right next to the A key where the Control key should really be. So I have the following in my .xsession file to set the correct keyboard layout and to turn the Caps Lock key into a Control key:
xkbsel 'xfree86(de_CH)' setxkbmap -option ctrl:nocaps
This was working fine until a little while ago when my backspace key turned into a delete key. This was particularly annoying because I have configured my delete key to send ^Ap which is the screen code to move to the previous window. I also lost the ability to type []{}#~ and \ which makes programming in Perl difficult, @ which makes it hard to send mail, and | which makes all sorts of command line operations difficult.
It turns out that somehow xkbsel had been removed. Well, I know how. I did an aptitude dist-upgrade and didn't pay sufficient attention to everything it told me before I hit Y. Or more accurately, Y, then Yes, then Y and then Yes again, as seems to be necessary these days.
So reinstalling that package put my keyboard back into a usable state. But running setxkbmap then gives me a German layout instead of Swiss German:
$ setxkbmap -v 10 -option ctrl:nocaps Setting verbose level to 10 locale is C Applied rules from xfree86: model: pc105 layout: de options: ctrl:nocaps Trying to build keymap using the following components: keycodes: xfree86+aliases(qwertz) types: complete compat: complete symbols: pc/pc(pc105)+pc/de+ctrl(nocaps) geometry: pc(pc105)
and explicitly specifying a Swiss German layout results in the following error:
$ setxkbmap -v 10 de ch ctrl:nocaps Setting verbose level to 10 locale is C Warning! Multiple definitions of keyboard layout Using command line, ignoring X server Applied rules from xfree86: model: pc105 layout: de variant: ch options: ctrl:nocaps Trying to build keymap using the following components: keycodes: xfree86+aliases(qwertz) types: complete compat: complete symbols: pc/pc(pc105)+pc/de(ch)+ctrl(nocaps) geometry: pc(pc105) Error loading new keyboard description
I really don't feel up to fixing this at the moment, so I've gone back to having an annoyingly placed Caps Lock key which I keep pressing at inopportune moments.