Skip to content

Instantly share code, notes, and snippets.

@ImanMousavi
Created September 8, 2023 13:46
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 ImanMousavi/9fa50421412f1729a01b142a566b949e to your computer and use it in GitHub Desktop.
Save ImanMousavi/9fa50421412f1729a01b142a566b949e to your computer and use it in GitHub Desktop.
AHS: CapsLock like on MacOS
#Requires AutoHotkey v2.0
SendMode "Input"
$CapsLock::
{
CapsError := !KeyWait("CapsLock", "T0.5")
If CapsError {
if GetKeyState("CapsLock", "T") = 0
SetCapsLockState("on")
else
SetCapsLockState("off")
CapsError := !KeyWait("CapsLock")
}
else Send("{Alt Down}{Shift Down}{Shift Up}{Alt Up}")
Return
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment