Skip to content

Instantly share code, notes, and snippets.

@adamdekan
Last active May 23, 2025 10:16
Show Gist options
  • Save adamdekan/8b8c8596033375ae1eb4cbd82bbf0959 to your computer and use it in GitHub Desktop.
Save adamdekan/8b8c8596033375ae1eb4cbd82bbf0959 to your computer and use it in GitHub Desktop.
Ahk v2 CapsLock to Esc/Ctrl
*CapsLock::
{
Send "{LControl down}"
}
*CapsLock up::
{
Send "{LControl Up}"
if (A_PriorKey=="CapsLock"){
if (A_TimeSincePriorHotkey < 400)
Suspend "1"
Send "{Esc}"
Suspend "0"
}
}
sendMuteToggle() {
Send("{LWin Down}{Alt Down}k{Alt Up}{LWin Up}")
}
MButton::sendMuteToggle()
AppsKey::sendMuteToggle()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment