Created
May 24, 2022 18:05
-
-
Save subnut/ae48047c9f3155118660941a6df2cc21 to your computer and use it in GitHub Desktop.
capsctrl - CapsLock if tapped, Control if held
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
; CapsLock is Left control | |
CapsLock::LCtrl | |
CapsLock up:: | |
Send, {LCtrl up} | |
if (A_TimeSincePriorHotkey < 150) | |
Send, {Blind}{CapsLock} | |
; SetCapsLockState % !GetKeyState("CapsLock", "T") | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment