Main > Software Forum
Keyboard2Xinput (Virtual X360 pads from keyboard)
PL1:
--- Quote from: alg0280 on June 26, 2022, 08:12:55 am ---It looks like the server hosting the binary releases is down? I'm getting
This site can’t be reached
kb2xi.schwingsk.net’s server IP address could not be found.
when I tried to download 1.2.2.
--- End quote ---
Try again.
Just confirmed that the server is working. ;D
Scott
alg0280:
--- Quote from: PL1 on June 26, 2022, 12:41:20 pm ---Try again.
Just confirmed that the server is working. ;D
Scott
--- End quote ---
Thanks, it's working now for me.
BigPuppy:
Hello, thank you for your work with this project. I bought a cabinet that had a lot of stuff installed including Attract Mode, but the joysticks were only set to keyboard and none of the Steam games I was trying to play worked quite right.
My main issue now is that I can't quite get the AHK script for Steam to work. I've taken the sample and filled in my directories:
--- Code: ---#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
Run, "R:\Arcade\Keyboard2Xinput\Keyboard2XinputGui.exe"
Run, "C:\Program Files (x86)\Steam\steam.exe" -applaunch %1%
isRunning := "0"
While (isRunning = "0") ; Wait until the game is launched
RegRead, isRunning, HKCU\Software\Valve\Steam\Apps\%1%, Running
Sleep, 5000
Sleep, 5000
MouseMove, 1920, 1200
WinGetTitle, Title
While (isRunning = "1") ; Wait until the game is closed
RegRead, isRunning, HKCU\Software\Valve\Steam\Apps\%1%, Running
Sleep, 500
; Game stopped, stop keyboard2Xinput by sending numpad multiply key (see k2x mapping.ini)
SendInput {NumpadMult}
; change focus back to Attract-Mode
WinActivate Attract-Mode
--- End code ---
Then, in AM, I have this as my emulator configuration:
--- Code: ---# Generated by Attract-Mode v2.6.1
#
executable R:\Arcade\Emulators\steamXinput.exe
args -applaunch [name]
workdir
rompath C:\Program Files (x86)\Steam\steamapps
romext .acf
system PC
info_source steam
nb_mode_wait 10
artwork flyer R:\Arcade\attract\scraper\Steam\boxart
artwork snap R:\Arcade\attract\scraper\Steam\video;R:\Arcade\attract\scraper\Steam\snap
--- End code ---
The behavior I'm seeing is that the parameter of the game doesn't seem to be passing to the AHF script I compiled or to the AHF script itself. The script will run and open K2X and Steam, but it doesn't try to open a game and just fails back to AM. Are there any variables that I'm missing?
BigPuppy:
Hello again. I ended up solving my problem a bit more indirectly without the use of an AHK script, but in case this helps anyone in the future:
* I set Keyboard2Xinput to start at Startup, but I left the startup parameter as disabled so that AM would continue to function.
I also reverted my AM Steam config file to the default.
I mapped the ToggleEnable in Keyboard2Xinput to the furthest, least used button on my cabinet (Player 3 Start in my case).
Whenever Steam launches a game, it seems to auto turn on K2X, but in case it doesn't, I simply toggle the P3 Start button when it is switching to Steam/Retroarch and then toggle back if needed when it focuses back to AM.
*
Schwing:
Hi BigPuppy,
you have an error in the emilator configuration:
--- Code: ---args -applaunch [name]
--- End code ---
should be
--- Code: ---args [name]
--- End code ---
That's what causing Steam to not launch your game.
I also see that you have 'Sleep, 5000' in the first while loop, don't forget to set it back to 500. It will still work but will generally wait too long before going on to the next section of code.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version