Skip to content

Instantly share code, notes, and snippets.

@junho85
Created July 3, 2015 01:46
Show Gist options
  • Save junho85/48bbd0f7166d189d7b15 to your computer and use it in GitHub Desktop.
Save junho85/48bbd0f7166d189d7b15 to your computer and use it in GitHub Desktop.
my autohotkey
; CapsLock to ESC
classname = ""
keystate = ""
*CapsLock::
WinGetClass, classname, A
if (classname = "PuTTY" or classname = "Vim" or classname="mintty" or "TMobaXtermForm") {
SetCapsLockState, Off
send,{ESC}
}
else {
GetKeyState, keystate, CapsLock, T
}
if (keystate = "D") {
SetCapsLockState, Off
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment