This question has already been asked here. The accepted answer says it is not possible. Other answers provide a way to do it on linux but I have not check if it worked. I am most interested in knowing if there is a way to do it for mac (although you can post answers for linux as well).
I am only reposting this question here because the other question on SOF is more than five years old. Ideally, I would like to remap to <ESC>
key to CAPS LOCK
.
Best Answer
If you are using the
X11
environment, you may achieve what you want with the following commands:which means: from now on, Caps_Lock key isn't anymore a keyboard modifier and fall back to a normal key
which means: get the keycode of
Caps_Lock
and from now on assign it the keysym ofEscape
.Note: this receipe works on any Unix.