Skip to content

Instantly share code, notes, and snippets.

@gpadd
Created March 7, 2024 10:25

Revisions

  1. gpadd created this gist Mar 7, 2024.
    16 changes: 16 additions & 0 deletions caps_2_ctrl_or_esc.ahk
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    #Requires AutoHotkey v2.0

    *CapsLock::
    {
    Send "{Blind}{Ctrl Down}"
    global cDown := A_TickCount
    }

    *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}"
    }