Skip to content

Instantly share code, notes, and snippets.

@rishigoutam
Created January 23, 2013 02:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rishigoutam/4601305 to your computer and use it in GitHub Desktop.
Save rishigoutam/4601305 to your computer and use it in GitHub Desktop.
Swap CapsLock and Escape using AutoHotkey. Save file at C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup to launch at startup.
CapsOn=false
Capslock::
;suspend to prevent calling esc
Suspend on
Send, {ESC}
Suspend off
return
Esc::
;use global variable to keep track of state
if CapsOn = false
{
CapsOn = true
SetCapsLockState, on
}
else
{
CapsOn = false
SetCapsLockState, off
}
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment