[Novalug] "Exorcising Caps Lock"
Luigi de Guzman
luigi12081 at cox.net
Tue Jul 10 19:30:12 EDT 2007
I was thoroughly roasted on this mailing-list when I inquired about just
such a change--apparently "capslock" is supposed to be a control key,
and anyone with the temerity to suggest otherwise is an agent of Satan.
So I went ahead and figured it out, at least for my own system, and put
it in my install report:
http://ouij.livejournal.com/207594.html
I'm running Ubuntu, by the way.
To remap keys on your keyboard in Ubuntu, you have to edit
/etc/console-tools/remap
which is nothing more than a script that runs sed on the output of
dumpkeys. The example script turns the capslock key into a control
key, which doubtless will bring great joy to all you dumb terminal guys
and emacs zealots out there. *I*, however, modified it
suitably to give me the escape key that I wanted there.
The config files in /etc/console-tools are called by the
init script at /etc/init.d/console-screen.sh, so to reflect any changes,
we have to
sudo /etc/init.d/console-screen.sh restart
Ubuntu Dapper, for some reason, does not run
/etc/init.d/console-screen.sh at startup. So, we have to make it do so.
I ended up adding a line to /etc/rc.local to make it load on
startup.
In X, we have to run xmodmap at start. First, we create
~/.Xmodmap, filling it with the following:
! Esc on caps lock
remove Lock = Caps_Lock
keysym Caps_Lock = Escape
Now all we have to do is run xmodmap at a
suitable time, either by calling it in .xinitrc or by otherwise
executing it before the X session gets underway. I ended up adding a
line to ~/.fluxbox/startup that ran xmodmap. Now I
have my preferred key bindings in both console and graphical
environments.
-Luigi
only 1337 enough to lurk.
More information about the Novalug
mailing list