Possible Duplicate:Remap CapsLock to Escape and Control System Wide Just read this seriously obsessive post about customising keyboards and while I'm not going to do everything there, there are a couple of ideas I'd like to nick. In particular he has set up the Caps Lock key so that:when pressed and released alone, it is mapped to Escwhen pressed and held, and a second key is pressed, it is mapped to CtrlAs he says, this is great for vim users. Is that possible in Linux/X?He also does something similar with the right and left Shift keys. When pressed alone they map to ( and ) but if another key is pressed they act as you expect Shift to work.
Can I map a key (caps lock) so it does one thing pressed alone, and another when pressed with a second key?
keyboard shortcuts;key mapping