Specifically, I don't know how to change CapsLock to a, because I don't remember the keycode. I'll find it a little later. But generally speaking, you can use xmodmap
(and .Xmodmap
) to change your keymappings. The first time GNOME detects your .Xmodmap
file, it'll ask if you want to always load it, and then you're set.
I also think caps lock is silly. However, the key position is useful. I like mapping it to the Control key. I use control a lot, and it's tiring for my pinky to be constantly reaching down in that awkward position. And as I later found, historically Control is where Caps Lock is currently. Anyway. Create a file in your home directory called .Xmodmap
with the following lines:
remove Lock = Caps_Lock
keysym Caps_Lock = Control_L
To make these changes take effect right this instant, run xmodmap ~/.Xmodmap
.
You can find keycodes on your own using xev
. Turns out the keycode for a is 38, or hex 0x61. So instead your .Xmodmap could be:
remove Lock = Caps_Lock
keysym Caps_Lock = 0x61
I highly recommend reading through the man page, lots of interesting stuff.
Best Answer
To double-check that the settings have been applied, look for
XKBOPTIONS="ctrl:swapcaps"
in/etc/default/console-setup
. (Alternatively, if you know what you're doing you can go ahead and just edit this file directly.)