Skip to content

Instantly share code, notes, and snippets.

@dguo
Last active March 23, 2019 02:35
Show Gist options
  • Save dguo/29ec31329bc3ab1d01c845d34fa72e8f to your computer and use it in GitHub Desktop.
Save dguo/29ec31329bc3ab1d01c845d34fa72e8f to your computer and use it in GitHub Desktop.
blog - Remap Caps Lock to Escape and Control - caps-lock-autohotkey
*CapsLock::
Send {Blind}{Ctrl Down}
cDown := A_TickCount
Return
*CapsLock up::
; Modify the threshold time (in milliseconds) as necessary
If ((A_TickCount-cDown) < 150)
Send {Blind}{Ctrl Up}{Esc}
Else
Send {Blind}{Ctrl Up}
Return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment