Remap CapsLock to Escape and Control – System Wide Guide

keyboard

Is it possible to remap the CapsLock key system wide such that when the CapsLock button is pressed by itself it acts as the escape key and when pressed with another key it acts as the control key?

Best Answer

I have found a very good solution called xcape. From the README:

xcape runs as a daemon and intercepts the Control key. If the Control key is pressed and released on its own, it will generate an Escape key event.

This makes more sense if you have remapped your Caps Lock key to Control. Future versions of this program might do that mapping for you, but for now this is something that you have to do yourself.

Related Question