Reputation: 8320
How to set up AutoHotkey so that when I press the Caps Lock, it will instead send the ESC key to the computer?
Upvotes: 24
Views: 17319
Reputation: 871
If you want to also map Esc to Capslock at the same time, do this:
$Capslock::Esc
$Esc::Capslock
Upvotes: 9
Reputation: 2257
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:
Look: https://autohotkey.com/docs/commands/Send.htm
Upvotes: 1
Reputation: 8320
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
Upvotes: 37