8
6
There's plenty of utilities that remap keys, but I can't seem to find a very specific feature: I want to have caps lock act as the control modifier key when held down, but as escape when pressed on its own.
A similar question was posed here, and one of the answers provided an AutoHotkey script, however it is susceptible to the timing of key presses and only handles a hard-coded list of all possible control+letter combinations. I would prefer it if it would function without quirks, blocking caps lock pressed events, storing any other keys pressed while the caps lock key has not yet been released, and then deciding whether to send escape or control.
Is there a simple utility or a more generic AutoHotkey script that does this?
The answer you posted to the other question also seems to not work with key chords. Specifically, it seems to work only with right shift. For example, I'm pressing CapsLock+Shift+Tab and trying to get Ctrl+Shift+Tab. Pressing CapsLock+LShift+Tab doesn't seem to generate anything at all, but CapsLock+RShift+Tab works fine. – rationalis – 2014-11-13T21:28:09.787
Not sure what's going wrong for you, but CapsLock+LShift+Tab works for me. (e.g. it successfully switches tabs in reverse order in Chrome.) I'm currently running on Windows 8.1 but I'm pretty sure it worked in Windows 7 and Windows 8, too. – Rich – 2014-11-14T10:13:57.147
FWIW, whilst I also don't like the answer I posted, I haven't ever experienced any issues with it in practice, so if the answer below isn't working for you (as you state in comments), it's worth trying out, at least. – Rich – 2013-12-16T10:13:41.720