2011-10-15

Make use of the Caps Lock key

So, there is this Caps Lock key on all keyboards, sitting untouched in polite society. Why not put it to good use? Here are the commands that map the Find symbol to the Caps key on Linux. Stick them somewhere in the X session startup:

xmodmap -e 'remove Lock = Caps_Lock'
xmodmap -e 'keycode 0x42 = Find'

Then I map the key to the keyword completion command in Emacs like this. The second command is needed for Emacs in a terminal window:

(global-set-key [find] 'dabbrev-expand)
(global-set-key "\M-[1~" 'dabbrev-expand)

No comments: