On the linux console, the loadkeys program loads a keymap. This program is part of the kbd package, and is usually invoked from an init script. Its input is a readable text file, which you can probably find if you follow the init scripts. You can also dump the keymap in this format with the dumpkeys utility.
On my Gentoo system, the keymaps are in the /usr/share/keymaps, and the default keymap is given in the /etc/rc.conf file. I've set this to my keymap which I've made by changing and existing keymap (this modified keymap predates my Gentoo system though, I have it from the time I've been using SuSE).
Here I include some relevant parts from the keymap file.
The trickyer part is to get the keys right under X. I didn't do this part all alone, rather, I copied the configuration from a good friend and only done a couple of modifications on it. This configuration program loads a keymap with the xmodmap program (which should be on your system if you have X). I start this configuration program from my .xinitrc file so that it would start on every X session (depending on the X login manager, you may need to use a different file for this).
I show some parts of this configuration too.
(There are some other tricky details needed to set up X correctly to use national characters, but they aren't quite relevant to the caps-lock hack, so I won't show them here.)
For further information, see the manpages of the above mentioned utilities, and also
http://www.inf.bme.hu/~pts/pts-console-hu-latest.tar.gz;
http://www.madore.org/~david/linux/.
If anyone needs them, I can upload a copy of the exact config files I use.
|