-
Notifications
You must be signed in to change notification settings - Fork 11
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
Need help to merge 2 joysticks into 1 #5
Comments
Hi, good question. Will be glad to help. Can you run input-read on the |
Thank you very much. As you can see, I am not a programmer expert, so it seems that I didn't succeed to install uinput-mapper well. Or maybe, I forgot something wrong (see below) : What I am sure, is that I have many events, and to js (js0 and js1), so I guess those inputs are the joystick, is that correct ? |
You'd have to run it on |
Sorry for my late reply, my thumbstick is broken (a soldering on the arduino module has broken ! so I have to solder it again). Anyway, the main panel is working : ***
*** Also, using
*** Last but not least, please find the
I hope this will help to progress. Thank you again. |
Did you type |
Did you ever figure this out? |
Hi @MerlijnWajer, Great work and program, which I hope will solve my current problem! I’m trying to achieve a similar thing as @prog-amateur; I want to merge two gamepads(both present at /dev/input/eventX and jsX) into a uniput (keyboard) device for a game that reads from only one /dev/input device, but can have 2 players which different button layouts. The gamepads have the same input codes, example code 304 for BTN_SOUTH, which then for both gamepads needs to be remapped to different (keyboard) codes for each player as output to the same uinput device that the game can read; gamepad1 304 -> uinput 29 and gamepad2 -> uinput 100. And it would also be very convenient if I could choose the event number that the new virtual/merged input device appears on, so that this new /dev/input/event15 could be hardcoded in the game’s controller config file? UPDATE: This is the config file: And uinput-mapper is run like this from the console: If I try to increase the size of the of the nofd variable in input-create, it creates another uinput devices instead of mapping the two controllers to the same uinput device. Is this 2Input -> 1Output(uinput) possible to achieve out of the box, or with some small changes in the source code? UPDATE2: Would you be willing to update the source code, please, so that it indexes correctly for all cases with inputs >=< outputs(uinputs)? Your help would be greatly appreciated and I’ll be sure to mention it in my ongoing project. Hope to hear back from you soon! Br, |
Hi @Vegz78 - sorry for my very delayed response, I was cleaning up my inbox and found this message. It looks like you already figured out some of the problems, and in fact continued working on uinput-mapper - maybe I should look at your efforts and merge it back into this repo? I also saw you ported it to Python 3! |
#Hi @MerlijnWajer, Thanks for your response and no worries; better late than never! ;-) I really appreciate your work on uinput-mapper, which - with only a few modifications - solved all the challenges in my project. Apart from some extra controller configs and my latest changes to uinput-mapper, which is more of a quick and dirty hybrid Frankenstein of Python 3 support combined with backward compatibility with Python 2.7 than a port, where I have not done or tested any more than exactly what was needed for it to run without errors for my use case, I also broke your 1 input to many outputs support by setting the above mentioned array to 0, to enable many to one support. Since my fork of your project is mainly based on your efforts, you are of course welcome to use whatever you want from the uinput-mapper subtree in my repo. Give me a wink if I can help you in any way, but being pretty noob to GitHub and given that I included your work as a subtree instead of a submodule with active links back to your repo, I am uncertain if and how I could contribute by making a pull request etc. So it is probably just as convenient for you that you just trawl through If I could suggest a feature/make a wish, it would be that your updated input-mapper project would support all 1:n, 1:1 and n:1 relationships between inputs and outputs, maybe as a config option(maybe it already does, but I never figured out the right config option, hehe…) Keep up the great work! |
Hello, my question is not bug-related, but I think this is a used case which can help many people to easily use uinput-mapper.
Context :
I have a Bartop (with Linux Debian), I play on it and I really enjoy. However, the Joystick is digital (ON/OFF only).
Some games (racing, or walk moves in Mario/Zelda 3D, etc.) need an analog Joystick.
So I have bought an analog Thumbstick which works well.
However, when I try to set up the controls, the emulator considers 2 gamepads instead of one only.
Questions :
Thank you very much.
The text was updated successfully, but these errors were encountered: