Created
          September 8, 2023 13:46 
        
      - 
      
- 
        Save ImanMousavi/9fa50421412f1729a01b142a566b949e to your computer and use it in GitHub Desktop. 
    AHS: CapsLock like on MacOS
  
        
  
    
      This file contains hidden or 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
    
  
  
    
  | #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