-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for gamepads #117
Comments
Oo cool idea! Haven't heard of the Zero Delay encoders yet, great find! I agree, it would be great to get this stuff working with AHK since we're using it so much with the launcher already, but would it be possible to use another program like Joy2Key in the meantime? Just tried J2K for the first time in a while and it looks like it's not free and has a popup on first run which might be annoying on a Winnitron booting up, so I found a list of other potential candidates: https://www.s-config.com/zero-delay-usb-joystick-encoder/ |
Yeah, those other options work too. I had to return the Zero Delay board I was borrowing, but we could probably just implement an AHK script that people run along side the Winnitron software as a separate thing to run for the time being. When I did my (quick and hacky) testing, I didn't see any conflicting behaviour running a script outside Winnitron with the Winnitron launcher. |
I haven't had a chance to reproduce the error here yet, but I suspect adding this support will just be adding the gamepad/joy codes to to list of valid inputs in It'd be more work if we want to add support Network-side (ie for a game that uses a controller), but if we're just mapping game-key-press to winnitron-gamepad-button-press I think that's all we need. |
It is slightly more complicated due to needing to map analog axis to button presses, but if a macro or something could be defined to allow easy mapping for users that would be great. The first script I linked shows how you can do axis to button mapping in AHK: https://autohotkey.com/docs/misc/RemapJoystick.htm#joystick-axes Otherwise, yeah, the gamepad button to keyboard button mapping should be pretty much just a |
Yeah I wanna get some of the bug fixes in and and released and then we can take a closer look at this. |
I just took a look at your link. It looks like these Zero Delay boards can be toggled into a digital mode so instead of behaving as an analog stick it acts as a d-pad. That should get us pretty much full compatibility through just the |
Oops! That was the wrong link. I meant to link here: https://alternativeto.net/software/j2k/?platform=windows I thought you could use one of those to get joystick input to map to Winnitron controls on keyboard and that way hopefully the AHK key swapping stuff from the network will still work properly. |
IPACs are kind of expensive, at least compared to the super cheap Zero Delay encoders. Those cheap encoders act as gamepads though, often emulating a PS3 controller.
Running this autohotkey script manually gets a Zero Delay joystick working with the Winnitron launcher: https://autohotkey.com/docs/misc/RemapJoystick.htm#joystick-axes
The Zero Delay buttons can be accessed with
Joy1
throughJoy12
, similar to this: https://autohotkey.com/docs/misc/RemapJoystick.htm#different-approachesCurrently adding
Joy1
to the custom key mapping crashes the launcher on start up. I'm also not sure how to add the joystick axis handling script - I tried manually adding it toRunGame.ahk
a couple different ways but couldn't get it to fire the same way it does as a stand along script.I don't have a second encoder to test with, but AHK does support multiple gamepads. To specify specific gamepads, you should just be able to prefix the name with the gamepad's number, ie
1Joy3
for gamepad 1's button 3.The text was updated successfully, but these errors were encountered: