How to set up AutoHotkey so that when I press the Caps Lock, it will instead send the ESC key to the computer?
Asked
Active
Viewed 1.4k times
3 Answers
33
Mapping Caps Lock key to ESC key can be done as:
Capslock::Esc
Using this format, you can easily map Caps Lock to any key, for example, the enter key:
Capslock::Enter

Anonsage
- 8,030
- 5
- 48
- 51
-
2For completeness, since escape key is mapped to caps lock, I enable the escape to be the caps lock key. `Esc::Capslock` – Nasri Najib Mar 16 '21 at 02:05
8
If you want to also map Esc to Capslock at the same time, do this:
$Capslock::Esc
$Esc::Capslock

Al-Baraa El-Hag
- 770
- 6
- 15
0
Use Window Spy or try F12:keyhistory
to viewer a key code
Keymapping:
Capslock::MsgBox,,,test1
VK
vk14::MsgBox,,,test2
SC
sc03A::MsgBox,,,test13
Screenshot:

KingRider
- 2,140
- 25
- 23