Need help with ahk script for virtual gamepad

Ask gaming related questions (AHK v1.1 and older)
akisa91
Posts: 6
Joined: 09 Jan 2024, 08:24

Need help with ahk script for virtual gamepad

Post by akisa91 » 22 Jan 2024, 11:36

I play this racing game that for some buggy reason has very high input lag when playing on keyboard. I somehow finally found a fix to that by installing "keyboard splitter" and practically making a virtual gamepad out of my keyboard. Now that problem is gone and the game is much more responsive, but my simple autohotkey doesn't work anymore because the game doesn't see my keyboard as keyboard anymore rather than as gamepad controller.

Here's the code that worked before while playing on keyboard

Code: Select all

$q::
send, {w down}
sleep, 0
send, {w up}
sleep, 10
send, {d down}
sleep, 0
send, {d up}
sleep, 0
send, {d down}
sleep, 0
send, {d up}
sleep, 0
send, {d down}
sleep, 0
send, {d up}
sleep, 0
send, {d down}
sleep, 0
send, {d up}
return

$up::
send, {d down}
sleep, 0
send, {d up}
sleep, 0
send, {d down}
sleep, 0
send, {d up}
sleep, 0
send, {d down}
sleep, 0
send, {d up}
sleep, 0
send, {d down}
sleep, 0
send, {d up}
return
So as you can see it's a very simple quick macro, "q" = fast type wdddd, and "up" = dddd. Since I now assigned "w" (brake) and "d" (gas) buttons to a virtual gamepad buttons, that macro doesn't work anymore.

Here's what the settings in keyboard splitter look like https://ibb.co/tbrqKJg

So "d" (gas) is now button A, and "w"(brake) is Left Trigger button. Is there any way I can make macro so that works the same way as it worked before - that when I press button Q i get quick "wdddd" (or better to say button A, LT, LT, LT ,LT), and when I press UP i get quick "dddd (LT, LT, LT, LT)"? Is that something which is even possible?

I found this thread viewtopic.php?t=5705 but since I'm new at all this I didn't quite understand everything and I couldn't make it work. Any help is appreciated. Thanks!

[Mod edit: Moved topic from AHK v2 help to v1 help since this is v1 code.]

akisa91
Posts: 6
Joined: 09 Jan 2024, 08:24

Re: Need help with ahk script for virtual gamepad

Post by akisa91 » 26 Jan 2024, 21:04

anyone?

Post Reply

Return to “Gaming Help (v1)”