Skip to content

Instantly share code, notes, and snippets.

@dchang
Created February 4, 2020 16:44
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 dchang/440eaf9bba2c41d93772ec89d81c2af9 to your computer and use it in GitHub Desktop.
Save dchang/440eaf9bba2c41d93772ec89d81c2af9 to your computer and use it in GitHub Desktop.
AutoHotkey script to have caps2esc on Windows
*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