Custom key mapping in linux (ubuntu)

I did this in Ubuntu for a friend but it should theoretically work in any Debian setup using the X window manager, and would probably translate well into other Linux distros as well. The only info you really need is what keyboard layout you are already using. The setup on the laptop i'm working on is using the US international keyboard layout. The laptop I'm working on has a busted 'a' key and my friend would like to use the capslock key as the a key, but others might find this info useful for other reasons. So here goes.

1. open up a terminal
2. navigate to /etc/X11/xkb/symbols
3. find the keymap that you are using (for me it was "us")
4. open up your favorite text editor and edit the map file, nano is more than good enough for this instance though
5. find the key that you want to change since I was changing the capslock to 'a' I simply did a Control+W (where is?) and searched for 'Caps' which only goes to 2 values in the 'us' key map file, one for us international and one for us DVORAK so I only needed to change the first one which looked something like this like this:

key { [ Caps_Lock, Caps_Lock ] };

and i changed it to:

key { [ a, A ] };

which means when I hit the capslock I get the letter 'a' and if I hold shift and capslock I get 'A'

6. Once that's done a quick Control+o to write out, save the name
7. Control+x to exit nano.

That was a real quick writeup but should be helpful to anyone caught in the same situation.