How to hold a key for minimized application

Ask gaming related questions (AHK v1.1 and older)
taka2902
Posts: 3
Joined: 24 Jun 2020, 07:28

How to hold a key for minimized application

Post by taka2902 » 24 Jun 2020, 07:36

Hi, i'm trying to do something for in a game, so that when i press a key (Ctrl) the game will hold F9 until i press it again. But problem is when i alt+tab, minimized or do something what lose the focus of the game, the F9 key no more hold.
Heres my code so far:

Code: Select all

#IfWinActive, TouhouComBat
ctrl::
KeyDown := !KeyDown
If KeyDown
	SendInput {f9 down}
Else
	SendInput {f9 up}
Return
im still learning how this work so any help would appreciated :D

Return to “Gaming Help (v1)”