script that makes it so when a key is pressed, it remains activated until I press it again Topic is solved
-
- Posts: 5
- Joined: 09 May 2024, 22:13
script that makes it so when a key is pressed, it remains activated until I press it again
How can I configure ahk so that when I press a key, it remains activated until I press it again? (these being a,d,r) thank you in advance
Re: script that makes it so when a key is pressed, it remains activated until I press it again Topic is solved
Hallo,
try:or with AutoRepeat:
Other keys accordingly.
Edit: AutoRepeat version added.
try:
Code: Select all
#Requires AutoHotkey v2.0
*a:: {
Static A := False
Send (A:=!A)?"{Blind}{a down}":"{Blind}{a up}"
KeyWait "a"
}
Code: Select all
#Requires AutoHotkey v2.0
*a:: {
Static A := False, T:=()=>Send("{Blind}{a downR}")
SetTimer(T, 30*A:=!A), A?T():Send("{Blind}{a up}")
KeyWait "a"
}
Edit: AutoRepeat version added.
-
- Posts: 5
- Joined: 09 May 2024, 22:13