Main > Software Forum

Keyboard2Xinput (Virtual X360 pads from keyboard)

<< < (29/34) > >>

Schwing:
Hi all, I finally took the time to implement input buffering for Mortal Kombat XI & similar games; it took longer than expected because my first naive approach had some drawbacks that could lead to lost inputs...
Now everything works as expected on the PCs I tested.
A new parameter has been introduced in the config: pollInterval. If 0, the behavior is the same as before (well almost, as I have improved the flow, resulting in less input lag). if >0, it represents the number of milliseconds a first input is buffered before being fed to the virtual joystick. You'll have to experiment as this is highly dependent on the PC: my newer one only needs 2, and on my previous PC (a 7700K), 10 works fine. Since the optimizations I haven't needed to use a setting > 16 (for reference, I needed 20 on the same PC), which means that all is done in less than a frame at 60fps. I can't guarantee that it will be the case for every configuration, though ;)
If you have a six-button config and couldn't perform throws with Mortal Kombat XI, Injustice 2 or others, please test this version, I'm very curious to know if that solves the problem for everyone.
As always, any other feedback is welcome too!
Download

kagaden:

--- Quote from: Schwing on October 15, 2021, 08:15:41 am ---Hi all, I finally took the time to implement input buffering for Mortal Kombat XI & similar games; it took longer than expected because my first naive approach had some drawbacks that could lead to lost inputs...
Now everything works as expected on the PCs I tested.
A new parameter has been introduced in the config: pollInterval. If 0, the behavior is the same as before (well almost, as I have improved the flow, resulting in less input lag). if >0, it represents the number of milliseconds a first input is buffered before being fed to the virtual joystick. You'll have to experiment as this is highly dependent on the PC: my newer one only needs 2, and on my previous PC (a 7700K), 10 works fine. Since the optimizations I haven't needed to use a setting > 16 (for reference, I needed 20 on the same PC), which means that all is done in less than a frame at 60fps. I can't guarantee that it will be the case for every configuration, though ;)
If you have a six-button config and couldn't perform throws with Mortal Kombat XI, Injustice 2 or others, please test this version, I'm very curious to know if that solves the problem for everyone.
As always, any other feedback is welcome too!
Download

--- End quote ---

Nice work Schwing! Just wrapped up testing this out and here are my results on my PC

Windows 10 home - Build 19043
LG Oled 4k@60Hz
Mobo - Z590 Aorus Elite (F3d bios)
CPU - i5-11400
Ram - 32GB
DX12

Method - Tested various pollInterval settings with Injustice 2, then verified 17ms with MK11 to make sure it was 100% too

Results:
- 0-5 resulted in a very low success rate, maybe 5%
- 6-10 resulted in a slightly higher success rate, maybe 15%
- 10-16 resulted in a slightly higher success rate, maybe 25%
- 17ms resulted in a 100% success rate

Conclusion - My guess is going over the 16.7ms threshold for 1 frame of buffer @60hz completely fixed the issue. I'm going to set up 2 versions of Keyboard2Xinput, one with pollInterval set to 0 and one with pollInterval set to 17. The 17 setting I'll only use for the games that need it (MK11 and Injustice2 primarily) that have poor combo input detection themselves, that way I don't introduce 1 frame of lag across all 150 (or so) PC games I have running fine on the machine.

Tested the following NetherRealm games with 0 polling and could throw 100% of the time:
Injustice 1
MK Complete
MK XL

I'd only use this for MK11 and Injustice 2 so far, and it makes those games playable with minimal input latency!

Thanks again for this valuable update Schwing!

xul:
Did some quick testing on my system with MK11:

5 - ~25 - 35%
10 - ~ 35 - 50%
12 - ~seemed to be 25% ???
17 - ~ 90 - 100%

Processor   Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz   4.00 GHz
Installed RAM   16.0 GB (15.9 GB usable)
System type   64-bit operating system, x64-based processor
Edition   Windows 10 Pro
Version   21H1
OS build   19043.1288
Experience   Windows Feature Experience Pack 120.2212.3920.0
Nvidia RTX 2070 Super

Schwing:
Thanks Kagaden & Xul for the feedback, I had hoped that settings lower than 17 would also work on most systems, but it really seems to be quite picky about the processor (although I had some variations on my bartop, so other factors seem to influence results), but glad to know that it works nonetheless.
For reference,
My system is:
Windows 10 Pro
Processor   AMD Ryzen 7 5800X 8-Core Processor                3.80 GHz
Installed RAM   32.0 GB
Edition   Windows 10 Pro
Version   21H1
OS build   19043.1288
Experience   Windows Feature Experience Pack 120.2212.3920.0
Nvidia 1070Ti

2ms works fine on this system.

My kids' system:
Processor   Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz   4.20 GHz
Installed RAM   16,0 Go
Édition   Windows 10 Professionnel
Version   20H2
OS build   19042.1288
Expérience   Windows Feature Experience Pack 120.2212.3920.0
Nvidia Quadro K620

10 ms works fine on this one.

kagaden:

--- Quote from: Schwing on October 26, 2021, 03:43:13 am ---Thanks Kagaden & Xul for the feedback, I had hoped that settings lower than 17 would also work on most systems, but it really seems to be quite picky about the processor (although I had some variations on my bartop, so other factors seem to influence results), but glad to know that it works nonetheless.
For reference,
My system is:
Windows 10 Pro
Processor   AMD Ryzen 7 5800X 8-Core Processor                3.80 GHz
Installed RAM   32.0 GB
Edition   Windows 10 Pro
Version   21H1
OS build   19043.1288
Experience   Windows Feature Experience Pack 120.2212.3920.0
Nvidia 1070Ti

2ms works fine on this system.

My kids' system:
Processor   Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz   4.20 GHz
Installed RAM   16,0 Go
Édition   Windows 10 Professionnel
Version   20H2
OS build   19042.1288
Expérience   Windows Feature Experience Pack 120.2212.3920.0
Nvidia Quadro K620

10 ms works fine on this one.

--- End quote ---

I hope you've been having a wonderful holiday season while the year comes to a close, Schwing! I have a feature request that I hope should be really easy to implement into your latest version, if you are still working on this.

Feature Request: The latest version of Keyboard2Xinput -> with the ability to KEEP the keyboard keystrokes. (In other words, no keystroke blocking from K2X.)
Update - should have read through the readme info on his source page! This exists in the latest build :D When I have my arcade PC's home I'll give my solution a shot.

Explaination: As you know I've been doing years of research on windows idle timer with virtualized inputs in order to automatically close applications if the machine goes idle. I have a workaround with EventGhost, but it's pretty janky and doesn't work with all applications, so I've continued searching.

Discovery: I've come across an application called HidHide here: https://github.com/ViGEm/HidHide This application allows a user to take any input device, and block/allow specific programs from seeing inputs from it.

Hypothesis: My hypothesis is that a version of Keyboard2Xinput that doesn't block keystrokes would allow me to block keyboard keys with HidHide for every application EXCEPT windows idle timer and/or associated idle timer programs (like Turs Idle Volume Timer, or RLauncher itself). Hypothetically, this would allow for the idle timer to work the same as it does with a hardware keyboard event while not interfering with gameplay that is running.

If it's not too much trouble, would it be possible?

Thanks for considering it Schwing, and hope you and your family have an amazing 2022~
-K

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version