Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Keyboard2Xinput (Virtual X360 pads from keyboard)  (Read 92325 times)

0 Members and 1 Guest are viewing this topic.

Dainja

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 12
  • Last login:January 27, 2022, 07:29:31 am
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #40 on: October 07, 2019, 03:46:41 pm »
I finally made it work in Cuphead! Many hours later. Something is still causing the game hiccups though. It’s like jump and shot is being pressed at the same time and I don’t understand why. They are totally different keys both in the mapping and in the game assign controller setup and only if I start the game via Rocket Launcher. Works good without RL... weird.

Im VERY thankful for Schwigs work so far though. A true hero!
« Last Edit: October 07, 2019, 03:48:44 pm by Dainja »

Schwing

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 41
  • Last login:January 30, 2024, 01:40:08 pm
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #41 on: October 11, 2019, 06:33:07 am »
I finally made it work in Cuphead! Many hours later. Something is still causing the game hiccups though. It’s like jump and shot is being pressed at the same time and I don’t understand why. They are totally different keys both in the mapping and in the game assign controller setup and only if I start the game via Rocket Launcher. Works good without RL... weird.
Strange... kb2xi doesn't allow multiple instances, so it should behave the same way regardless of context of execution. Does RocketLauncher have some kind of key remapping in its features that you would have accidentally enabled?

Dainja

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 12
  • Last login:January 27, 2022, 07:29:31 am
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #42 on: October 14, 2019, 09:45:17 am »
I don’t know but I’m 100% sure that Joy2Key interferes with Keyboard2Xinput. When I kill Joy2Key everything works perfect. The problem is that Hyperspins menues seams to be mapped via Joy2Key so I can’t disable it. Anyone have a good solution for this?

I want to kill Joy2Key when I open up a PC Game with Keybors2Xinput and I want it start again when I exit a PC Game.

Option two would be to disable Joy2Key completely but then Hyperspin menues and some other games won’t work :(
« Last Edit: October 16, 2019, 03:54:24 am by Dainja »

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 287
  • Last login:March 04, 2024, 04:36:28 pm
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #43 on: October 14, 2019, 08:18:31 pm »
Just wanted to say thank you, your program is great.
So far i got it working with every game.
Some older games require a small delay before starting, otherwise it won't detect the second controller.
One such game is injustice.
Using rocketlauncher/ahk it's quite simple to add a 1.5 second delay.
I'm guessing that for 4 controllers you will need to add a longer delay.

Dainja

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 12
  • Last login:January 27, 2022, 07:29:31 am
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #44 on: October 15, 2019, 01:53:39 pm »
I finally made it all work. For me the problem was Joy2Key. I disabled it completely and everything works perfect. I’m so happy for this program Schwing! You sort of made my dream come true. To be able to play Cuphead 2 players on arcade. Do you accept donations?

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 287
  • Last login:March 04, 2024, 04:36:28 pm
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #45 on: October 17, 2019, 07:19:16 am »
I finally made it all work. For me the problem was Joy2Key. I disabled it completely and everything works perfect. I’m so happy for this program Schwing! You sort of made my dream come true. To be able to play Cuphead 2 players on arcade. Do you accept donations?
The real question that needs to be asked here is, why are you using Joy2Key in the first place if you have an IPAC?

Yardley

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 137
  • Last login:September 20, 2023, 07:35:08 pm
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #46 on: October 17, 2019, 07:41:02 am »
I finally made it all work. For me the problem was Joy2Key. I disabled it completely and everything works perfect. I’m so happy for this program Schwing! You sort of made my dream come true. To be able to play Cuphead 2 players on arcade. Do you accept donations?
The real question that needs to be asked here is, why are you using Joy2Key in the first place if you have an IPAC?

Unfortunately some games like SFV don’t allow mapping keyboard keys for player 2. I know the IPAC has game pad capabilities but I remember having issues with it. I’ve been meaning to revisit that.

Schwing

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 41
  • Last login:January 30, 2024, 01:40:08 pm
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #47 on: October 17, 2019, 07:54:16 am »
Some older games require a small delay before starting, otherwise it won't detect the second controller.
One such game is injustice.
Using rocketlauncher/ahk it's quite simple to add a 1.5 second delay.
I'm guessing that for 4 controllers you will need to add a longer delay.
Interesting; just to confirm, you run kb2xi, wait 1.5 seconds, then start Injustice?
I remember some old games that didn't detect pads if they were connected after the game had started, but I haven't encountered such a case on the games I play on my bartop setup. Maybe I should add that to the troubleshooting section. Doy you know of other games that need that delay?

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 287
  • Last login:March 04, 2024, 04:36:28 pm
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #48 on: October 17, 2019, 08:54:41 am »
I finally made it all work. For me the problem was Joy2Key. I disabled it completely and everything works perfect. I’m so happy for this program Schwing! You sort of made my dream come true. To be able to play Cuphead 2 players on arcade. Do you accept donations?
The real question that needs to be asked here is, why are you using Joy2Key in the first place if you have an IPAC?

Unfortunately some games like SFV don’t allow mapping keyboard keys for player 2. I know the IPAC has game pad capabilities but I remember having issues with it. I’ve been meaning to revisit that.
That doesn't answer my question. He is using Joy2Key, a program that converts joystick to keyboard, not the other way around, and he has a IPAC.
He has no use for joy2key, he only needs to use Keyboard2Xinput.

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 287
  • Last login:March 04, 2024, 04:36:28 pm
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #49 on: October 17, 2019, 08:57:25 am »
Some older games require a small delay before starting, otherwise it won't detect the second controller.
One such game is injustice.
Using rocketlauncher/ahk it's quite simple to add a 1.5 second delay.
I'm guessing that for 4 controllers you will need to add a longer delay.
Interesting; just to confirm, you run kb2xi, wait 1.5 seconds, then start Injustice?
I remember some old games that didn't detect pads if they were connected after the game had started, but I haven't encountered such a case on the games I play on my bartop setup. Maybe I should add that to the troubleshooting section. Doy you know of other games that need that delay?
Yes, that's exactly what i did. If i don't add the 1.5 second delay the game won't detect the second controller.
So far this has only happened with injustice, but i'm guessing this will happen with more older games, since this was the behavior with those old games.
I should also point out that i'm running the games from an ssd drive, so loading is almost instantaneous.
« Last Edit: October 17, 2019, 09:05:07 am by Foxhole »

Yardley

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 137
  • Last login:September 20, 2023, 07:35:08 pm
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #50 on: October 17, 2019, 09:12:01 am »
I finally made it all work. For me the problem was Joy2Key. I disabled it completely and everything works perfect. I’m so happy for this program Schwing! You sort of made my dream come true. To be able to play Cuphead 2 players on arcade. Do you accept donations?
The real question that needs to be asked here is, why are you using Joy2Key in the first place if you have an IPAC?

He’s using Joy2Key because you can tell he bought a preconfigured drive from someone and they have that running for Xbox controller use.
Unfortunately some games like SFV don’t allow mapping keyboard keys for player 2. I know the IPAC has game pad capabilities but I remember having issues with it. I’ve been meaning to revisit that.
That doesn't answer my question. He is using Joy2Key, a program that converts joystick to keyboard, not the other way around, and he has a IPAC.
He has no use for joy2key, he only needs to use Keyboard2Xinput.

Dainja

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 12
  • Last login:January 27, 2022, 07:29:31 am
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #51 on: October 23, 2019, 04:15:51 am »
I play a lot of Mortal Kombat 11. With Keyboard2Xinput and arcade sticks. However, you need the right stick on the Xbox controller to be able to move in the Krypt. Any solution?

Dainja

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 12
  • Last login:January 27, 2022, 07:29:31 am
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #52 on: November 17, 2019, 05:01:19 pm »
Teknoparrot emulated racing games does not work with keyboard. Only Xbox controllers. Would it be possible to make a Keyboard2Xinput for Teknoparrot (Sega Ringedge) games?

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 287
  • Last login:March 04, 2024, 04:36:28 pm
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #53 on: November 21, 2019, 05:24:11 pm »
This post should be in the Sticky.
Who do you need to contact to get this post up in the Sticky?
Btw, BlazBlue Cross Tag Battle also needs a delay, it seems it doesn't support hotswap, probably a directinput game.
« Last Edit: November 21, 2019, 06:04:41 pm by Foxhole »

Schwing

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 41
  • Last login:January 30, 2024, 01:40:08 pm
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #54 on: November 23, 2019, 05:20:20 am »
Teknoparrot emulated racing games does not work with keyboard. Only Xbox controllers. Would it be possible to make a Keyboard2Xinput for Teknoparrot (Sega Ringedge) games?
I haven't tried Teknoparrot yet, that's strange. If it supports XInput it should work with Keyboard2Xinput, so maybe they do something nonstandard (I believe they run in some kind of virtual environment to protect their code, so maybe that's the culprit?). I'll have a look but no promises :)

Schwing

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 41
  • Last login:January 30, 2024, 01:40:08 pm
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #55 on: November 23, 2019, 08:53:58 am »
Hi again Dainja, I just tried TeknoParrot with Initial D 7, and had no problem with k2xi: what games have you had trouble with? What version of TeknoParrot (I have apparently the latest one, 1.0.0.249)?

regis69

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 1
  • Last login:September 05, 2022, 07:58:22 am
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #56 on: November 26, 2019, 07:35:02 pm »
I have been having an odd issue with SF5 and minipac board on my arcade rig. Prior to SF5 updating earlier this year, I was using a batch file to reconfigure the ipac board specifically for this game. Worked great. I didn't have to use vjoy and x360ce or AHK.

Since the SF5 update, my methods filed to work and configuring vjoy and x360ce did not work well. I came across keyboard2xinput and installed ViGMe bus and Visual C++ 2015 32bit. My OS is WIN 10 pro.

I'm using the default mapping.ini file and see SF5 key config displayed in lower right upon loading game. When I go into controller setup though, player 1's "Y" keybinding is not detected, same for player 2's "X" keybinding. They are set in mapping.ini as "Z" and "W" respectively and if I open a notepad doc, and press these buttons, I get Z and W. So that is the first strange thing bc all the other bindings work. The second oddity, while still in SF5 controller setup, although I press player 1's "Y" ( medium kick ) and nothing happens, if I press the "X" (low kick) on player 2, it triggers the medium kick on player 1. The opposite happens with player 2's "X" (low kick). I press it, nothing is triggered, log file says "key not detected", but if I press player 1's "Y" (medium kick), it triggers the low kick on player 2. I hope this makes sense.

The obvious solution would be to try to remap these two buttons by swapping the resultant keybindings. Nope. Same problem. Weird.

Then I tried changing one of the keybindings in on the ipac board to another letter. I changed "Z" to "Y" then made the same change in mappings.ini. This time, player 1's medium kick button not only triggered nothing for player 1's controller, it did not trigger the low kick on player 2's controller.

I'm open to suggestions at this point.

Below is the mapping.ini file I am using.

[startup]
enabled = true
[config]
Subtract = disable
Add = enable
Divide = enableToggle
Multiply = exit
[pad1]
Up = UP
Down = DOWN
Left = LEFT
Right = RIGHT
LControlKey = A
LAlt = B
LShiftKey = X
Z = Y
X = RB
Space = LB
V = RT
C = LT
D5 = START
D1 = BACK

[pad2]
R = UP
F = DOWN
D = LEFT
G = RIGHT
S = B
A = A
I = Y
W = X
K = RB
Q = LB
L = RT
J = LT
D6 = START
D2 = BACK

Thanks for your help.

angryherbalist

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 4
  • Last login:December 01, 2019, 02:59:22 pm
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #57 on: December 01, 2019, 11:28:20 am »
hey dude.

i've got a game for steam that has the buttons all weird and i want that particular game to have different buttons.  it would make most sense for me to run the exe with a separate mappings.ini, but I'm using Launchbox/BigBox and already have the KeyBoard2XInput running but disabled.  bigbox launches an AHK script to enable/disable the Key2xinput for games that require xinput.

I don't want to have to unload the app before launching that one game and then load a diff mapping file. 

any thoughts on how i can make this work?

kagaden

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 243
  • Last login:September 10, 2022, 10:58:37 pm
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #58 on: December 24, 2019, 07:07:42 pm »
Schwing, thank you so much for this simplified solution!

I plan on updating my 2 cabs with this over the holidays starting today, if I run across any ideas or helpful advice I'll post here.

I'd be interested donating after I'm all wrapped up too.  :cheers:


kagaden

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 243
  • Last login:September 10, 2022, 10:58:37 pm
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #59 on: December 25, 2019, 04:41:53 am »
Some older games require a small delay before starting, otherwise it won't detect the second controller.
One such game is injustice.
Using rocketlauncher/ahk it's quite simple to add a 1.5 second delay.
I'm guessing that for 4 controllers you will need to add a longer delay.
Interesting; just to confirm, you run kb2xi, wait 1.5 seconds, then start Injustice?
I remember some old games that didn't detect pads if they were connected after the game had started, but I haven't encountered such a case on the games I play on my bartop setup. Maybe I should add that to the troubleshooting section. Doy you know of other games that need that delay?
Yes, that's exactly what i did. If i don't add the 1.5 second delay the game won't detect the second controller.
So far this has only happened with injustice, but i'm guessing this will happen with more older games, since this was the behavior with those old games.
I should also point out that i'm running the games from an ssd drive, so loading is almost instantaneous.

I'm running from an SSD as well and also ran into this behavior, now working on where I can add a delay to load the game. Update: Launching from RL, I put it in postlaunch & added a 1500ms delay in the wait setting. Worked like a dream.

With k2x running & launching SFV from Steam = No issues, both players work great.
Launching with Rocketlauncher with Pre/Post exit enable/disable script = Also works with both players great.
Launching from Hyperspin, which kicks off the above configuration in Rocketlauncher = Keyboard keys are not blocked. This causes: Player 1 works, Player 2's inputs are broken and cause P1 to attack as well at times because both the P2 gamepad + P1 Keyboard key is pressed on the same button.  Toggling the gamepads off with - and on with + result in keys still not being blocked.

Bug Report: When HyperSpin is running keys are not blocked.
1. Launch Notepad
2. Launch K2X and Enable it
3. Attempt to type with blocked keys into Notepad
4. ---> Note that keys are blocked, no visible input
5. Launch Hyperspin
6. Alt-Tab back to Notepad while Hyperspin is loaded in the background
7. Attempt to type with blocked keys into Notepad
8. ---> Note that keys are now unblocked, all inputs are visible
9. Press "-" to toggle K2X off
10. Press "+" to toggle K2X on
11. Attempt to type with blocked keys into Notepad
12. ---> Note that keys are still unblocked, all inputs are visible

Expected Result ---> Keys should be blocked while K2X is enabled.

PC - Windows 7 latest update, Hyperspin 1.4.0

Workaround - If Hyperspin is loaded first before K2X, then K2X key blocking works properly along with toggles. If K2X is loaded (for example on system boot) first prior to Hyperspin, then the above behavior happens. Therefore, for me the safest way I found is to not use togglemode and load/unload K2X with every game that requires it, which was how it was intended to be used prior to toggling.

Bug report: When launching the .exe directly from RocketLauncher as Pre-Launch, RocketLauncher will hang.
1. Open RocketLauncherUI
2. Add K2X.exe as Pre-Launch for your PC game
3. Launch the game with the rocket icon
4. ---> The game will not load and will hang. If there's a fade screen the fade screen will persist until reboot.
5. Change K2X.exe to load as Post-Launch for your PC game
6. Launch the game with the rocket icon
7. ---> The game will load with K2X without issue.
8. Create a batch file to load K2X.exe
9. Change to load K2X.exe with a batch file instead of directly, in Pre-Launch
10. Launch the game with the rocket icon
11. ---> The game will load with K2X without issue.

Expected Results---> K2X will load without hanging the game. This may be a RocketLauncher compatibility issue but seems strange it will load from a Batch file or Post-Launch, but will hang on Pre-Launch.
Workaround - Use Post-Launch to load the exe directly. Or a batch file to load with Pre-Launch (this is what I'm doing for most games).

I hope this testing of behavior was helpful as I finished up my cab! These are the only 2 issues I ran into + workarounds that are hopefully helpful for others.
« Last Edit: January 01, 2020, 06:12:49 pm by kagaden »

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 287
  • Last login:March 04, 2024, 04:36:28 pm
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #60 on: December 25, 2019, 05:03:15 pm »
Some older games require a small delay before starting, otherwise it won't detect the second controller.
One such game is injustice.
Using rocketlauncher/ahk it's quite simple to add a 1.5 second delay.
I'm guessing that for 4 controllers you will need to add a longer delay.
Interesting; just to confirm, you run kb2xi, wait 1.5 seconds, then start Injustice?
I remember some old games that didn't detect pads if they were connected after the game had started, but I haven't encountered such a case on the games I play on my bartop setup. Maybe I should add that to the troubleshooting section. Doy you know of other games that need that delay?
Yes, that's exactly what i did. If i don't add the 1.5 second delay the game won't detect the second controller.
So far this has only happened with injustice, but i'm guessing this will happen with more older games, since this was the behavior with those old games.
I should also point out that i'm running the games from an ssd drive, so loading is almost instantaneous.

I'm running from an SSD as well and also ran into this behavior, now working on where I can add a delay to load the game.

With k2x running & launching SFV from Steam = No issues, both players work great.
Launching with Rocketlauncher with Pre/Post exit enable/disable script = Also works with both players great.
Launching from Hyperspin, which kicks off the above configuration in Rocketlauncher = Keyboard keys are not blocked. This causes: Player 1 works, Player 2's inputs are broken and cause P1 to attack as well at times because both the P2 gamepad + P1 Keyboard key is pressed on the same button.  Toggling the gamepads off with - and on with + result in keys still not being blocked.

Bug Report: When HyperSpin is running keys are not blocked.
1. Launch Notepad
2. Launch K2X and Enable it
3. Attempt to type with blocked keys into Notepad
4. ---> Note that keys are blocked, no visible input
5. Launch Hyperspin
6. Alt-Tab back to Notepad while Hyperspin is loaded in the background
7. Attempt to type with blocked keys into Notepad
8. ---> Note that keys are now unblocked, all inputs are visible
9. Press "-" to toggle K2X off
10. Press "+" to toggle K2X on
11. Attempt to type with blocked keys into Notepad
12. ---> Note that keys are still unblocked, all inputs are visible

Expected Result ---> Keys should be blocked while K2X is enabled.

PC - Windows 7 latest update, Hyperspin 1.4.0

Workaround - If Hyperspin is loaded first before K2X, then K2X key blocking works properly along with toggles. If K2X is loaded (for example on system boot) first prior to Hyperspin, then the above behavior happens. Therefore, for me the safest way I found is to not use togglemode and load/unload K2X with every game that requires it, which was how it was intended to be used prior to toggling.
Just tested this and can confirm that hyperspin does in fact unblocks the keys if starting k2x before hyperspin.
I've always scripted k2x to run just before loading a game so never realized this.

kagaden

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 243
  • Last login:September 10, 2022, 10:58:37 pm
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #61 on: December 26, 2019, 02:15:15 am »
Just tested this and can confirm that hyperspin does in fact unblocks the keys if starting k2x before hyperspin.
I've always scripted k2x to run just before loading a game so never realized this.

Thanks Foxhole and Merry Christmas! I was editing and updating as I went and wanted to document my findings there. I did run into the P2 not responding/race condition issue with Injustice 1, but every other game worked really well.

I'm just glad it works, this app is amazing and we've needed it for years in the community!

kagaden

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 243
  • Last login:September 10, 2022, 10:58:37 pm
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #62 on: January 01, 2020, 06:03:36 pm »
Hi, I have a IPAC2, and though it works quite well with emulators, it's a pain with recent Windows games that only support XInput. I tried quite a lot of solutions (only one working was UCR, but it's quite a pain to configure), but nothing was as simple as the old x360-like dll plus a mapping file.
I had been following Nefarius' ViGEm Bus Driver (https://github.com/ViGEm/ViGEmBus), and in february began implementing some software with it. After quite a bit of fiddling, I had something working. Fast forward 6 months and I finally got around to polishing it a bit and making a public release, so here it is: https://gitlab.com/SchwingSK/Keyboard2Xinput.

I'm not going to copy/paste the whole documentation here, but here are the highlights:
  • simple mapping file as configuration (one key = one button/axis)
  • creates as many pads as you want (not tested but should work with IPAC4 or any other keyboard encoder)
  • lightweigt (fast startup)
  • discreet (no splashscreen)
  • supports passing mapping file as argument if you need different mappings for different games
  • support for a toggle on/off key so that if you need your keyboard in-game you can have access to it
  • open source so that anyone can submit merge requests/fork the project

I've tested it on Windows 7 & 10. On my two pcs, it has been quite stable, BUT: this is my first time coding in C#, I tried to follow conventions, but I'm sure I made lots of beginner mistakes, so keep that in mind if it misbehaves/doesn't work

Any comments are welcome, I'll TRY to address issues, but my experience in C# is limited, so no promises ;)

Important note: please make sure to read installation instructions. Keyboard2Xinput in itself only requires unzipping but it depends on ViGEm (releases) and CAN'T work without it.
Please note that as of 2019/04/18, ViGEm now has an installer, making installation much simpler!

Latest version download

Version history:
1.2.0 (2019/07/12)
- add option to start disabled - Issue #4
- add distinct keys to enable/disable - Issue #5
1.1.1 (2019/04/10)
- Tray icon doesn't disappear when program exits - Issue #2
- Confusing behavior when ViGem is not installed - Issue #3
download

1.1.0 (2019/04/08)
- thumb sticks support added by SpaceNinja
- added small delay between controllers creation to get consistent controller order (SpaceNinja again!)
download

1.0.0 (2018/08/17)

initial release

Your work is marvelous and has made my cab far more stable across xinput controls. Thank you so much for putting it together. If there's somewhere I can donate to you and SpaceNinja for your efforts, please let me know!

kagaden

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 243
  • Last login:September 10, 2022, 10:58:37 pm
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #63 on: January 01, 2020, 06:14:43 pm »
How do we get a sticky on this thread?

xlbt

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:February 01, 2020, 05:26:04 am
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #64 on: January 29, 2020, 08:32:05 am »
Hello,

I try to integrate SFV in my arcade machine with keyboard for controllers.
And I want to use your soft that looks great !

I just have a problem with my configuration as I use special characters (:;, ...) and numerical characters.
All the buttons with alpha letters are remapped and work well, but all the button with special and numerical characters are not mapped.
So in my case, it's not possible to play with the second controller...

Here is my mapping file :
[startup]
enabled = true
[config]
Subtract = disable
Add = enable
Divide = enableToggle
Multiply = exit
[pad1]
Up = UP
Down = DOWN
Left = LEFT
Right = RIGHT
W = A
X = B
Q = X
S = Y
D = RB
F = LB
C = RT
V = LT
& = START
( = BACK

[pad2]
8 = UP
2 = DOWN
4 = LEFT
6 = RIGHT
; = B
, = A
K = Y
J = X
L = RB
M = LB
: = RT
! = LT
é = START
- = BACK


Here is a log :
---
2020-01-29 10:07:08,491 [1] INFO  Keyboard2XinputGui.Program- Keyboard2Xinput v1.1.2
2020-01-29 10:07:08,537 [1] DEBUG Keyboard2XinputLib.Config- Using default config file: mapping.ini
2020-01-29 10:07:08,537 [1] INFO  Keyboard2XinputLib.Config- Loading config file: C:\Borne\Softs\Keyboard2Xinput-1.2.0\mapping.ini
2020-01-29 10:07:08,560 [1] DEBUG Keyboard2XinputLib.Config- found config for pad 1
2020-01-29 10:07:08,560 [1] DEBUG Keyboard2XinputLib.Config- found config for pad 2
2020-01-29 10:07:08,560 [1] INFO  Keyboard2XinputLib.Config- found 2 pads
2020-01-29 10:07:08,560 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- initialize dicts done.
2020-01-29 10:07:11,298 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- unmapped button NumPad8
2020-01-29 10:07:11,445 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- unmapped button NumPad8
2020-01-29 10:07:11,768 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- unmapped button NumPad2
2020-01-29 10:07:11,900 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- unmapped button NumPad2
2020-01-29 10:07:12,232 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- unmapped button NumPad4
2020-01-29 10:07:12,370 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- unmapped button NumPad4
2020-01-29 10:07:12,670 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- unmapped button NumPad6
2020-01-29 10:07:12,802 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- unmapped button NumPad6
2020-01-29 10:07:13,551 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad2 X down
2020-01-29 10:07:13,651 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad2 X up
2020-01-29 10:07:13,952 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad2 Y down
2020-01-29 10:07:14,052 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad2 Y up
2020-01-29 10:07:14,337 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad2 RB down
2020-01-29 10:07:14,453 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad2 RB up
2020-01-29 10:07:14,776 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad2 LB down
2020-01-29 10:07:14,876 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad2 LB up
2020-01-29 10:07:15,509 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- unmapped button Oemcomma
2020-01-29 10:07:15,609 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- unmapped button Oemcomma
2020-01-29 10:07:15,894 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- unmapped button OemPeriod
2020-01-29 10:07:15,995 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- unmapped button OemPeriod
2020-01-29 10:07:16,296 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- unmapped button OemQuestion
2020-01-29 10:07:16,411 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- unmapped button OemQuestion
2020-01-29 10:07:16,681 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- unmapped button Oem8
2020-01-29 10:07:16,781 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- unmapped button Oem8
2020-01-29 10:07:17,947 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- unmapped button D2
2020-01-29 10:07:18,063 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- unmapped button D2
2020-01-29 10:07:18,749 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- unmapped button D6
2020-01-29 10:07:18,887 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- unmapped button D6
2020-01-29 10:07:20,770 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- unmapped button Return
2020-01-29 10:07:20,823 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- unmapped button Return
2020-01-29 10:07:22,042 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad1 UP down
2020-01-29 10:07:22,195 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad1 UP up
2020-01-29 10:07:22,443 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad1 DOWN down
2020-01-29 10:07:22,628 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad1 DOWN up
2020-01-29 10:07:22,928 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad1 LEFT down
2020-01-29 10:07:23,113 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad1 LEFT up
2020-01-29 10:07:23,376 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad1 RIGHT down
2020-01-29 10:07:23,530 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad1 RIGHT up
2020-01-29 10:07:24,116 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad1 X down
2020-01-29 10:07:24,248 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad1 X up
2020-01-29 10:07:24,517 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad1 Y down
2020-01-29 10:07:24,633 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad1 Y up
2020-01-29 10:07:24,896 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad1 RB down
2020-01-29 10:07:25,018 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad1 RB up
2020-01-29 10:07:25,304 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad1 LB down
2020-01-29 10:07:25,404 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad1 LB up
2020-01-29 10:07:25,952 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad1 A down
2020-01-29 10:07:26,068 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad1 A up
2020-01-29 10:07:26,322 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad1 B down
2020-01-29 10:07:26,422 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad1 B up
2020-01-29 10:07:26,669 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad1 RT down
2020-01-29 10:07:26,785 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad1 RT up
2020-01-29 10:07:27,055 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad1 LT down
2020-01-29 10:07:27,171 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- pad1 LT up
2020-01-29 10:07:28,042 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- unmapped button D1
2020-01-29 10:07:28,158 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- unmapped button D1
2020-01-29 10:07:28,628 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- unmapped button D5
2020-01-29 10:07:28,759 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- unmapped button D5
2020-01-29 10:07:34,405 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- Closing
2020-01-29 10:07:34,405 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- Disconnecting Nefarius.ViGEm.Client.Targets.Xbox360Controller
2020-01-29 10:07:34,405 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- Disconnecting Nefarius.ViGEm.Client.Targets.Xbox360Controller
2020-01-29 10:07:34,405 [1] DEBUG Keyboard2XinputLib.Keyboard2Xinput- Disposing of ViGEm client
---


Do I make something wrong ?

Thanks for the help.

xlbt

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:February 01, 2020, 05:26:04 am
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #65 on: January 29, 2020, 12:50:46 pm »
Sorry,
I finaly anderstood.  :banghead:
I replaced the special characters by "Oemcomma", "OemPeriod" and the other words that are written in the log and it works.

Thanks for this excellent soft !
« Last Edit: January 29, 2020, 12:52:41 pm by xlbt »

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 287
  • Last login:March 04, 2024, 04:36:28 pm
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #66 on: January 29, 2020, 01:00:25 pm »

xlbt

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:February 01, 2020, 05:26:04 am
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #67 on: February 01, 2020, 05:25:15 am »
Launching with Rocketlauncher with Pre/Post exit enable/disable script = Also works with both players great.
his testing of behavior was helpful as I finished up my cab! These are the only 2 issues I ran into + workarounds that are hopefully helpful for others.

Hello,

Can you please share the scripts for launch and kill with RocketLauncher ?
Or explain what to do.

I'm trying to launch SFV in Hyperspin + RocketLauncher with start of Keyboard2Xinput before and stop Keyboard2Xinput on exit.

Thanks a lot.

xul

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 15
  • Last login:March 18, 2024, 12:13:49 pm
  • Toasty!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #68 on: February 04, 2020, 07:47:27 pm »
Wow - First off, I want to say Thank you to Schwing!!!!! We have needed this for years.  I've been trying to find a Xinput solution to Keyboard and have spent so much time on workarounds.  I'm playing around with this now.  I stumbled upon this by looking up a solution for another similar utility.   :applaud: :applaud: :applaud: :applaud: :applaud: :applaud: :applaud: :cheers: :cheers: :cheers: :cheers: :cheers:

For reference - here's another one. https://github.com/mikew/xarcade-xinput

K2X seems a bit easier to build batch files around.  Thank you so much!!!

Furinex

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:February 07, 2020, 01:02:06 pm
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #69 on: February 06, 2020, 01:39:43 pm »
Im having an issue getting this to work properly and Im hoping someone can assist.  Ive been trying to setup Dragon Ball FighterZ on my arcade for some time, and its driving me up a wall.  Ive setup all my mappings, and they are indeed working, but IN GAME they dont work.  If I Alt Tab (Still can see the game in the background) and move my joystick around, press buttons, etc, it moves my character in game.  So I know its forwarding it to the game its just NOT doing it when the game is focused as the main window.  Is there something I can try?  Game Controller panel testing works fine.  Doesnt work in Game, unless I alt tab and focus another window, then it works in the game in the background.

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 287
  • Last login:March 04, 2024, 04:36:28 pm
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #70 on: February 07, 2020, 09:27:33 am »
Im having an issue getting this to work properly and Im hoping someone can assist.  Ive been trying to setup Dragon Ball FighterZ on my arcade for some time, and its driving me up a wall.  Ive setup all my mappings, and they are indeed working, but IN GAME they dont work.  If I Alt Tab (Still can see the game in the background) and move my joystick around, press buttons, etc, it moves my character in game.  So I know its forwarding it to the game its just NOT doing it when the game is focused as the main window.  Is there something I can try?  Game Controller panel testing works fine.  Doesnt work in Game, unless I alt tab and focus another window, then it works in the game in the background.
Any chance you have x360ce in the game's folder?
I had a similar issue when i forgot to remove x360ce from the game's folder.

Furinex

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:February 07, 2020, 01:02:06 pm
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #71 on: February 07, 2020, 01:02:06 pm »
Im having an issue getting this to work properly and Im hoping someone can assist.  Ive been trying to setup Dragon Ball FighterZ on my arcade for some time, and its driving me up a wall.  Ive setup all my mappings, and they are indeed working, but IN GAME they dont work.  If I Alt Tab (Still can see the game in the background) and move my joystick around, press buttons, etc, it moves my character in game.  So I know its forwarding it to the game its just NOT doing it when the game is focused as the main window.  Is there something I can try?  Game Controller panel testing works fine.  Doesnt work in Game, unless I alt tab and focus another window, then it works in the game in the background.
Any chance you have x360ce in the game's folder?
I had a similar issue when i forgot to remove x360ce from the game's folder.


You did it you crazy son of a ---smurfette---, you did it.  Thank You so much, man this saved my day!!

Dainja

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 12
  • Last login:January 27, 2022, 07:29:31 am
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #72 on: February 16, 2020, 02:37:00 pm »
Ive been playing games for months now with K2X and its been working real good in Teknoparrat games, Steam games and everyhting else. Such a blessing! BUT, now it started acting funny. If I play a two player game it works fine for maybe 20 minutes then suddently player one or two loose control over the movement and the character *or whatever your controlling* just keep moving to the right. And you cant move. I have to quit the game and start it up again. Same thing happens over and over after a couple of minutes. In different games.

Schwing

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 41
  • Last login:January 30, 2024, 01:40:08 pm
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #73 on: February 17, 2020, 02:02:32 am »
Ive been playing games for months now with K2X and its been working real good in Teknoparrat games, Steam games and everyhting else. Such a blessing! BUT, now it started acting funny. If I play a two player game it works fine for maybe 20 minutes then suddently player one or two loose control over the movement and the character *or whatever your controlling* just keep moving to the right. And you cant move. I have to quit the game and start it up again. Same thing happens over and over after a couple of minutes. In different games.
Hi Dainja, I'm sorry to hear that it acts this way. Have you looked in the log file? Does it say something unusual? Can send me one right after you quit k2xi (the log file is deleted at each start)?
If it does this in every game, i'd blame some other tool you might have installed, or maybe a Windows update, but for now I'm at a loss over what could be causing this, especially as it only affects the right direction...

Schwing

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 41
  • Last login:January 30, 2024, 01:40:08 pm
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #74 on: February 17, 2020, 02:23:10 am »
Hi all,
sorry for the lack of updates lately (well, as usual you could say ;) ), I haven't had much time to work on k2xi, but have read all your posts, so here goes:
- Kagaden: Hyperspin must be doing something that resets the key interceptors, I'll have to see if I can detect that.
- angryherbalist: as usual, nice ideas from you :) I've been thinking about it and what I've come up with is this:
    * have a main mapping file (with the [config] section); define new key mappings in this section to 'switch' mappings
    * create files mapping1.ini, mapping2.ini, etc (up to mapping 9) next to the main mapping file. These must not contain a [config] section (otherwise I think it would be too confusing).
    * this allows to switch configurations on the fly. I've got a crude implementation working, have to make sure it's a bit robust before I do another release
- angryherbalist again: you suggested to have the tray icon change when k2xi is disabled, and it'sindeed really useful: I've implemented it, but now that we can have multiple mappings, I'm thinking that maybe displaying the current mapping number in the tray icon might be useful. What do you all think?

Also, many thanks to Foxhole for helping other users out!
I MAY have time to work on this over the next two days, but if don't, the next release won't happen before march (but I'll try my best to make it start of march).

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 287
  • Last login:March 04, 2024, 04:36:28 pm
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #75 on: February 17, 2020, 03:52:57 am »
Ive been playing games for months now with K2X and its been working real good in Teknoparrat games, Steam games and everyhting else. Such a blessing! BUT, now it started acting funny. If I play a two player game it works fine for maybe 20 minutes then suddently player one or two loose control over the movement and the character *or whatever your controlling* just keep moving to the right. And you cant move. I have to quit the game and start it up again. Same thing happens over and over after a couple of minutes. In different games.
I've seen a similar behavior happening on a friend's setup and I'm currently trying to track the issue down.
I think i may have an idea as to what's happening.
Dainja, please open a Run prompt and type joy.cpl and press enter. Do this without k2x running.
Please tell me what you see or better, post a picture of the joy.cpl screen.
« Last Edit: February 17, 2020, 03:55:06 am by Foxhole »

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 287
  • Last login:March 04, 2024, 04:36:28 pm
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #76 on: February 17, 2020, 05:52:26 am »
Dainja, i would like you to also disconnect every keyboard, wireless or wired, from the pc leaving only the ipac connected and check if that helps.

MartyKong

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 167
  • Last login:January 31, 2024, 03:47:47 pm
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #77 on: March 14, 2020, 07:05:00 pm »
First off a great big THANKS to Schwing for this great software. I am launching Pac-Man Museum as a single game off my main wheel using HyperHQ. I no very little about AHK but was able to create a file that launches Keyboard2Xinput then the game, waits until the game is closed and shuts off Keyboard2Xinput.exe. The only minor annoyance is two windows beeps you hear as the .exe's launch. Please have a look, I'm sure there's room for improvement. If anyone else can use this, simply convert .ahk to .exe and change your path's to point to your executable's. Then launch through HyperHq.

#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.
#SingleInstance, Force
#Persistent

Run D:\Arcade\System roms\PC Games\PAC-MAN MUSEUM\Keyboard2Xinput\Keyboard2XinputGui.exe
Sleep, 1000  ; sleep 1 second
Run, D:\Arcade\System roms\PC Games\PAC-MAN MUSEUM\PACMuseum.exe
Sleep, 1000  ; sleep 1 second

SetTimer, ProcessCheckTimer, 3000
Return
 
ProcessCheckTimer:
Process, Exist, PACMuseum.exe
pid1 := ErrorLevel
If (!pid1)
{  Process, Exist, Keyboard2XinputGui.exe
   pid2 := ErrorLevel
   If (pid2)
      Process, Close, %pid2%
   ExitApp
}
Return

Schwing

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 41
  • Last login:January 30, 2024, 01:40:08 pm
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #78 on: March 15, 2020, 09:29:13 am »
The only minor annoyance is two windows beeps you hear as the .exe's launch. Please have a look, I'm sure there's room for improvement.
As k2xi does not trigger any sound itself, what you hear must be the default Windows sound for when you connect a USB device (which is what happens virtually when the pads are created), so if you want to get rid of them: search for 'change system sounds' in your start menu (Windows 10, name may be different on earlier OS), and look for the 'Device Connect' & 'Device Disconnect' sounds: you can disbale them by selecting 'None' in the associated drop-down box.

Thanks for the AHK script, I'll compare it with mine, as I intend to provide example scripts (also for Steam, which is a pain to setup) in the next version.

MartyKong

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 167
  • Last login:January 31, 2024, 03:47:47 pm
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #79 on: March 15, 2020, 09:56:30 am »
No problem. If I come a crossed any improvements I'll updatebut so far works well. Much appreciated ;D