AutoHotkey script to remap CapsLock to Ctrl, when pressed together with another key. When pressed alone (actually, the criterium is a fast release), CapsLock acts like Escape.
(Yes, the useless CapsLock function is entirely disabled)
On Windows, this is most useful for Emacs users, but maybe there are other use cases.
Please notice that I'm still learning AutoHotkey. The basic code come from this discussion, and this general idea come from these three posts.
An earlier version of this script also tried to modify the behaviour of the Enter
key, making it like Enter
when pressed fast and Ctrl
when pressed with another key, but I got a weird behaviour on Windows, so I decided to eliminate this feature.