The Cranky Sysadmin A world of technology, fun, and ignorant rants.

May 2, 2014

When XFCE and emacs colide

Filed under: Programming,System Administration — Cranky Sysadmin @ 7:49 pm

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.


case "$1" in
	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

/usr/bin/setxkbmap -option '' -option "ctrl:$1"

Run it with no arguments to get some help. I currently prefer nocaps.

1 Comment »

  1. Thank you, the broken C-space has been bugging me!

    Comment by Aaron B. — August 15, 2014 @ 9:42 pm

RSS feed for comments on this post.

Leave a comment

Powered by WordPress