I am a heavy Vim user and one of the first things I do when I start working on a clean ubuntu installation is to swap the caps lock and esc keys to reduce hand movements over the keyboard.
So far I have been doing it through the keyboard configuration dialog, but I am now writting a set of scripts that will set Ubuntu up the way I like and I have not been able to find a scriptable or programmable way to change this configuration item.
I am not looking for options that swap the keys at any other level than gnome itself, so what I am looking for is for a way to script this change and have it appear in the keyboard configuration that I used to use, should I decide to revert it manually in the future.