In general, people with vim, Emacs will have the idea of doing keyboard mapping
I was, of course, when I started to learn vim, I thought, put the ESC key in the upper left corner,
is a very small thing, slightly larger keyboard, the finger must leave the position to press the ESC key,
But I used to basically use a notebook with the keyboard, and did not feel much inconvenience.
Later changed a keyboard, it felt that this is too inconvenient.
So there is the idea of a keyboard mapping, that time still using Windows,reshape to add a few rules,
It's easy OK:
ESC---> Left_ctrl
Left_ctrl---> Caps_lock
Caps_lock---> ESC
But after I changed Ubuntu, this was a problem.
Xmodmap is the next most used keyboard mapping tool in Linux, and you can find a very detailed tutorial on the web.
However, I have not seen such a mapping. Caps_lock and Left_ctrl exchange of the majority, it seems that the syntax is relatively simple,
But, after adding ESC, it's going to make a mistake, just give up caps_lock and do the mapping:
Remove lock = Caps_lock
Remove control = control_l
Keysym control_l = Escape
Keysym Caps_lock = control_l
Add control = control_l
Just a few lines of code, how can not be intact mapping.
But also enough, at home do not need Caps_lock key, give up also doesn't matter.
Ubuntu under Xmodmap maps ESC and ctrl_l