Xubuntu 14.04 has decided to abscond with a couple of keys that I use for emacs, and I want them back! The first key is C-space, which emacs uses for setting a mark. I use this all the time and I’m not willing to do without it. It turns out that there is this feature called IBus which steals the key and uses it to switch input methods (for entering foreign characters I’ve read). To change this behavior, right-click on the ibus panel applet, and select preferences. You’ll see “Next input method” and it’s bound to C-space by default. you can use the intuitive “…” button to change this. I changed it to FN-space (called “Launc6” on my keyboard). Next up is the capslock key, which I rarely use except in shell scripts. I’d like to bind it to the ctl key. Since I haven’t decided whether I want to do this permanently, I wrote a script to give me some options.
#!/bin/bash case "$1" in caps) ;; nocaps) ;; swapcaps) ;; *) CMDNAME=`basename $0` echo "Usage:" echo "$CMDNAME [caps|nocaps|swapcaps]" echo "----------------------" echo "$CMDNAME will adjust the mapping of your left ctl and capslock keys." echo "an argument 'swapcaps' swaps the two keys" echo "'nocaps' changes the capslock to a ctl and leaves the left ctl as-is" echo "'caps' returns the keys to the original settings" exit 1 ;; esac /usr/bin/setxkbmap -option '' -option "ctrl:$1"
Run it with no arguments to get some help. I currently prefer nocaps.