AutoHotKey input
#1
Hi, I'm a long time user of PCSX2. In a much older version, I was able to send input with AutoHotKey that corresponded with my controller setup, and the emulator detected the input. For example, if I mapped Triangle to the 's' key and sent 's' with AutoHotKey, Triangle would properly be pressed in the game. However, with the current version of PCSX2, I cannot do this; there does not seem to be any way to send input with a program and have PCSX2 respond to it.

EDIT: Problem solved, it was SetKeyDelay. Nothing to see here folks Smile

Sponsored links

#2
By "newer version" do you mean the official 1.2.1 or the latest beta?
Can you post your script?
#3
Just the official build, but I also tried it as far back as 1.0.0 and that doesn't work either. I have a version before 1.0.0 that does work with AutoHotKey, not sure which version at the moment, can't quite check.

As for the script, just send any key with another key. For example:
Code:
a::Send {Down}
Normally this would simply remap the 'a' key on the keyboard to press the Down arrow, and in fact it does this. But if you press the 'a' key while in AutoHotKey, you won't move down in menus, nor will your character move at all, so PCSX2 isn't accepting AutoHotKey input, I guess because it's not a physical device sending the input but a logical one.

EDIT: Just tried something too: normally I have 'z' mapped to Circle and 'x' mapped to Cross. If I write the following script:
Code:
z::Send x
Then 'z' should actually send Cross. However, it not only fails to send Cross, it fails to send Circle! It's as if AutoHotKey completely throws PCSX2 for a loop. I miss the old behavior ;__;
#4
does PCSX2 have focus?
#5
Of course XD
#6
(07-12-2014, 08:21 PM)Hellacia Wrote: Of course XD

try setting SendKeyDownDely higher (try 10?)
#7
Holy *****, you fixed the universe. It wasn't accepting it because it wasn't seeing it for long enough. SetKeyDelay, 50, 50 worked. I can tweak it from here. +Infinity rep.
#8
Yes,that could fix it...keep in mind that some games\emulators ignore too fast key up\down states so you can also try
Send{Down Down}
Sleep,50 ; or 100
Send,{Down Up}
#9
This thread is a lifesaver. For what it's worth, I had to use slightly different settings:

SetKeyDelay, 10, 100

The first parameter, "Delay", is just the delay it waits before sending the command. No need to increase this, I just used the default of "10".

The second parameter, "PressDuration", is where it's at. Mine actually didn't work until I set it to 100. I tested it all the way up to 85 and it still didn't work, but 100 did.
#10
The most recent post in this thread is more than 8 months old. Please create a new thread and refrain from posting in threads older than 8 months in the future. Please also review the forum rules. Thank you.
CPU : AMD Ryzen 7 3800X
Mobo : Asus PRIME B450-PLUS
GPU : NVIDIA GeForce RTX 3070
RAM : 16 Go




Users browsing this thread: 1 Guest(s)