Last active
September 30, 2023 14:19
-
-
Save kudorgyozo/b15c5420f53b024aa5206ebc7b0cf120 to your computer and use it in GitHub Desktop.
autohotkey repeat key, also beep on enable disable
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
#Requires AutoHotkey v2.0 | |
#SuspendExempt | |
^`:: | |
{ | |
if (A_IsSuspended) { | |
SoundBeep 392, 300 | |
} else { | |
SoundBeep 261, 300 | |
} | |
Suspend ; Ctrl+Alt+S | |
} | |
#SuspendExempt False | |
; ~ : passes the keydown through | |
; $ : allows sending hotkey itself | |
~$e:: | |
{ | |
Sleep(400) ;Repeat delay | |
While GetKeyState("e", "P") | |
{ | |
SendInput "{e Down}" ;repeated keydowns | |
Sleep(50) ;Repeat rate | |
SendInput "{e up}" ;repeated keydowns | |
Sleep(50) ;Repeat rate | |
;SendInput "{e Up}" | |
;Sleep(100) | |
} ; ~ passes the keyup through | |
Return | |
} | |
; ~LButton:: ; ~ passes the keydown through | |
; { | |
; Sleep(400) ;Repeat delay | |
; While GetKeyState("LButton", "P") | |
; { | |
; SendInput "{LButton Down}" ;repeated keydowns | |
; Sleep(100) ;Repeat rate | |
; } ; ~ passes the keyup through | |
; Return | |
; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment