Skip to content

Instantly share code, notes, and snippets.

@AbePralle
Created October 22, 2022 06:22
Show Gist options
  • Select an option

  • Save AbePralle/11354cf19942564b9f9e0cd0bc54e494 to your computer and use it in GitHub Desktop.

Select an option

Save AbePralle/11354cf19942564b9f9e0cd0bc54e494 to your computer and use it in GitHub Desktop.
AutoHotkey map [CAPS LOCK] to [CTRL] and [ESC]
; Install AHK: https://www.autohotkey.com
; Save this script somewhere
; File Explorer > type in: Startup
; Drag script shortcut into Startup folder
; Double-click to run
*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