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
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 1120 times)

0 Members and 1 Guest are viewing this topic.

Schwing

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
Keyboard2Xinput (Virtual X360 pads from keyboard)
« on: August 17, 2018, 02:46:12 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 ;)

TheManuel

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 788
  • On and off hobbyist
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #1 on: August 23, 2018, 03:01:37 pm »
Thanks for sharing this.  I'll give it a try tonight and see if I'm lucky and it helps me with this issue.
"The Manuel"

TheManuel

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 788
  • On and off hobbyist
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #2 on: August 23, 2018, 08:51:34 pm »
Schwing:

I must congratulate you on this piece of software.  I found it easy to install and very simple to use.  I will use it to retrofit all my fighting games if vjoy ever stops working.  I also like how the ini file uses xbox controller button names which makes the mapping easier.

Alas, it did not resolve my problem with Injustice 2 but this is in no way the fault of your program.  That game apparently refuses to work well with keyboards, no matter how the inputs are translated. 

If ever you become interested in that game and use your software to enable your control panel, make sure to check that button double presses work correctly, particularly light attack + heavy attack, which equates to the throw function.  If you manage to find a solution I would be very interested in it.

Best regards and thanks again for posting this here.
"The Manuel"

Schwing

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #3 on: August 24, 2018, 08:55:56 am »
Yay, my first user!

Thanks TheManuel for taking the time to test it and reporting back! Really happy to see you found it useful :)
Too bad for Injustice 2. I don't have that game, but I have added it to my waitlist, so when its price drops a bit more, I'll buy it & report back.

Quote
thanks again for posting this here.
Well, my account doesn't show this, but I've been a long (LONG) time lurker here, and found so many great knowledge & ideas here when I finally started making my bartop (one day I'll summon the courage to do a full report of what I learned in the process). It feels nice giving back a little.

TheManuel

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 788
  • On and off hobbyist
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #4 on: August 24, 2018, 09:04:45 am »
Well, my account doesn't show this, but I've been a long (LONG) time lurker here, and found so many great knowledge & ideas here when I finally started making my bartop (one day I'll summon the courage to do a full report of what I learned in the process). It feels nice giving back a little.

Rest assured, you have already done more for this community on your second post than I have as a member since 2002.  If I had your application and the supporting driver when I started adding modern fighting games to my cab, I would have used it as it is simple to set up and run, but I've set up so many already that it would be a drag to go back and retrofit all my installations.

It is nice to see that this forum keeps going and participation hasn't completely fizzled, even as original arcade goers like me are now into our 40's and 50's.  Somehow the arcade concept refuses to completely die off.  It would have done so long ago if not for emulation, of course.
"The Manuel"

neohusky

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 31
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #5 on: November 23, 2018, 07:28:27 am »
WOW!
What a find. I canít wait to try this out in the usual Steam games as well as injustice 2.

TheManuel

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 788
  • On and off hobbyist
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #6 on: November 25, 2018, 10:46:03 am »
  • simple mapping file as configuration (one key = one button/axis)
Hello, again.

I started migrating all my PC games from vjoy to this app and so far, so good.  I just wonder if your comment above implies that it is not possible to map one keyboard key to two xinput buttons.  This is not something I was using in my vjoy setup but would be a nice bonus.

Also, very minor but, in your computer, does the tray icon persist after you close the app?  It does in mine.

Regards.
"The Manuel"

getnbizzy

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 28
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #7 on: January 08, 2019, 07:48:10 pm »
Schwing:

I must congratulate you on this piece of software.  I found it easy to install and very simple to use.  I will use it to retrofit all my fighting games if vjoy ever stops working.  I also like how the ini file uses xbox controller button names which makes the mapping easier.

Alas, it did not resolve my problem with Injustice 2 but this is in no way the fault of your program.  That game apparently refuses to work well with keyboards, no matter how the inputs are translated. 

If ever you become interested in that game and use your software to enable your control panel, make sure to check that button double presses work correctly, particularly light attack + heavy attack, which equates to the throw function.  If you manage to find a solution I would be very interested in it.

Best regards and thanks again for posting this here.

I don't have injustice 2 so i'm not much help there, but have you tried blocking the specific keys that you have mapped? I'm thinking the game is seeing both your keyboard inputs as well as dinput/xinput inputs simultaneously. I think vjoy has an option to block the keystrokes, so if you haven't already i'd start there. If the game works fine with game controllers then it has to be related to the mixture of xinput and keystrokes. If vjoy doesn't block the keys then maybe there's a way to run a batch along with the game exe. Just my 2 cents. Good luck.

TheManuel

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 788
  • On and off hobbyist
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #8 on: January 09, 2019, 08:23:15 am »
I don't have injustice 2 so i'm not much help there, but have you tried blocking the specific keys that you have mapped? I'm thinking the game is seeing both your keyboard inputs as well as dinput/xinput inputs simultaneously. I think vjoy has an option to block the keystrokes, so if you haven't already i'd start there. If the game works fine with game controllers then it has to be related to the mixture of xinput and keystrokes. If vjoy doesn't block the keys then maybe there's a way to run a batch along with the game exe. Just my 2 cents. Good luck.

It's a good lead but, while I'm slowly converting my fighting games to keyboard2xinput, I'm still using vjoy for Injustice 2 with key blocking and everything, and the problem is still there.  In fact, that is what let me to this other method after trying a couple of others.  They all have the same issue with this game so I don't think it is related to key blocking.
"The Manuel"

getnbizzy

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 28
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #9 on: January 09, 2019, 10:19:21 am »
Quote
It's a good lead but, while I'm slowly converting my fighting games to keyboard2xinput, I'm still using vjoy for Injustice 2 with key blocking and everything, and the problem is still there.  In fact, that is what let me to this other method after trying a couple of others.  They all have the same issue with this game so I don't think it is related to key blocking.
Another thing I read yesterday that vjoy key blocking doesn't work on windows 7 or vista. Hopefully someone figures it out soon because I too would like to have this game. Right now I'm testing the new keyboard encoder from xgaming. It has xinput and dinput modes and works great in the pc games I've tested so far. Andy really needs to update the ipac to do this too. Another thing you can try is the paclink adapter that connects to your ipac and then makes it a dinput(maybe xinput cant remember) usb controller. I know of some people that prefer to use the ipac this way instead. Good luck.

TheManuel

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 788
  • On and off hobbyist
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #10 on: January 09, 2019, 12:50:44 pm »
Yes, that's correct; vjoy's key blocking did not work for me when I had Windows 7 but started working when I migrated to Windows 10.  My i-Pac setup works fine for my and keyboard2xinput is a painless enough solution for my few PC games, it's just Injustice 2 that is giving me these issues.  It's strange that it's "sister game" MKX doesn't have it as well, so they've probably changed their input handling code.
"The Manuel"

getnbizzy

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 28
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #11 on: January 09, 2019, 02:33:47 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 ;)
Thanks Schwing. This could be the next best thing since demulshooter. I was digging around github last night trying to figure out what was needed and found it a bit confusing. I kept getting an error when running keyboardxinput.exe and found that I didn't have my prerequisites. Any chance you'll be packaging the driver and the keyb2xinput files into a simple installer with instructions? I think it would really increase the number of people that would be willing to help test and debug this program.

branded

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #12 on: January 13, 2019, 05:40:04 am »
Shwing,

Thanks for your efforts to this annoying issue.

Is there any possibility of your software to support 4 gamepads/players?


Thanks!

TheManuel

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 788
  • On and off hobbyist
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #13 on: January 13, 2019, 09:28:22 am »
Shwing,

Thanks for your efforts to this annoying issue.

Is there any possibility of your software to support 4 gamepads/players?


Thanks!
The list of features on the first post states that you can create several virtual pads. 
Did you try it and it did not work?
"The Manuel"

Yardley

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 66
  • I want to build my own arcade controls!
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #14 on: January 28, 2019, 08:31:09 pm »
This is awesome! Wow, how is there no more talk of this?

TheManuel

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 788
  • On and off hobbyist
Re: Keyboard2Xinput (Virtual X360 pads from keyboard)
« Reply #15 on: January 28, 2019, 09:43:28 pm »
Hi, there.  I think this was a project for fun by Schwing and he might have lost interest by now, as I don't see any activity on his code page.  Regardless, it is a great tool to have and I'm really glad her shared it.
"The Manuel"

  
 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31