Skip to content

Instantly share code, notes, and snippets.

@fqx
Created February 21, 2020 01:32
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 fqx/a950bb3cc300b3897475a1a573c0e87f to your computer and use it in GitHub Desktop.
Save fqx/a950bb3cc300b3897475a1a573c0e87f to your computer and use it in GitHub Desktop.
AutoHotKey config file to simulate Caps key like macOS
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
$CapsLock::
KeyWait, CapsLock, T0.5
If ErrorLevel {
SetCapsLockState % !GetKeyState("CapsLock", "T")
KeyWait, CapsLock
} Else
Send {Shift}
Return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment