-
Notifications
You must be signed in to change notification settings - Fork 160
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
input-remapper disables joystick pass through #437
Comments
This has to do with the way we apply the remapping and the forwarding of input events. When no injection is running for a input-device inputremapper does nothing and the device works as if inputremapper is not running at all. If a injection is running we clone the original device and forward all input-events to the clone except the ones used by a mapping. All events generated by a mapping are sent to predefined virtual devices (gamepad, keyboard or mouse). This means if you configure a game without the injection running you are configuring a different device than the one used if a injection is running. On some games this works fine, on others not. I am currently working on the beta branch which aims to address those issues by allowing to remap not only keys but also every other input-event. This will allow us to only use the predefined "gamepad" for all the functions the original gamepad provides while also applying any mapping. |
I think we're talking about separate issues, I see how the above would mess with keybindings in a game, but the joystick is not changed in input-remapper. But all I'm doing with input-remapper is configuring the device to use the keyboard events that are already bound, so I'm not configuring gamepad thumb --> event in game. I'm configuring gamepad thumb --> Spacebar (already bound from keyboard in game). Based on the above though, I did the following diagnostic to confirm it was not an issue with the input remapper starting after the game was running: So I still think something about the joystick input/pass through with input-remapper is the issue and not something with how input remapper is outputting to the game. It seems to work as expected for all other keys on the pad, just not the omni-joystick. Do you consider the beta branch stable? And will it install over the current or as a separate installation? Happy to try it if you think it might work. Can send feedback afterwards |
I think I need to clarify: even if you map only one button of your gamepad to something else the whole gamepad is cloned into a different device. On which game do you observe the issue? Maybe I can try and reproduce the issue. You can try the beta branch it will install over the current installation and create a copy of all your existing mappings. so you will not lose anything and can always roll back. In your case I would suggest you use this branch it is essentially beta with one added feature that allows you to map all the axis of your gamepad to the virtual inputremapper-gamepad. |
That makes more sense, thanks -- still no change in behavior though when starting before the game or making changes and re-applying while game is running. If I try to capture a new key and "change" key and manipulate the joystick, it doesn't register anything. I have both left/right joystick set to "joystick" in the configurable space on the left. So I don't know where else to configure a joystick in the interface to make sure it's passed through successfully. I'll install the version you linked above hopefully later today and see what happens. This is happening while playing Final Fantasy XIV via Lutris |
Ok, this beta + 1 commit seems to be working much better. The joystick now registers as an input when trying to assign keys. It shows as Joystick-Y Up, Joystick-X Right, etc as input register values. There was no equivalent output so I mapped to KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT. Using those configs I was able to move the character around via joystick control on the gamepad. It had a few quirks:
Honestly though, the amount of configuring I have to do to just push a joystick input through seems high. Most people are going to want the direction of the joystick to just pass through. Is there a way to just pass unassigned signals through the emulated device like a transparent proxy layer in networking? Or does everything have to be caught and processed for the emulation to work? Overall though, this beta +1 branch allows the joystick to work. So I can at least use my gamepad now! Thanks for the support. I think I can deal with the little bit of quirkyness to get all the extra buttons |
first of all thank you for the feedback.
Those are the arrow keys on your keyboard, so you use the joystick to push the keyboard buttons. edit: see also beta usage |
That worked MUCH better, much better match out of the box to the joystick functionality pre-input-remapper. I had tried that before, but I guess when in "keyboard" target output that didn't work. I just had "no axis" or something like that as an option. Switching to gamepad mode enabled the analog input. Thanks for your time |
Ok, so not sure if I should open a new issue or if this is related -- After adding the joystick on analog, everything was working fine. All bindings were good, joystick control was good. I decided to remap one of the keys originally pointing to ALT_L to SHIFT_L. I made no other changes to the config. I then tried to restart injection and input-mapper reported "Staring injection" bottom left, but the "stop injection" never lit up. The injections weren't happening. I swapped the key binding back, but same problem. Restarted input-mapper, same problem. I did a system halt and brought everything up from scratch, same problem. I rebuilt the beta and did an apt remove and re-installed. Same problem If I wait long enough, bottom left eventually goes to "injection failed" state. I'm pretty confused as everything was working and the change I made was minor - and the fact this bad state persisted through a re-install and a system halt is even more impressive. Not sure what happened. Only other thing I'm thinking of doing is deleting the whole key binding list and rebuilding from scratch. If that works I'll report back |
I created a new issue for this: #441 |
hello, |
Can you please explain what you are trying to do and what your issues are? |
I want to play a game with my PS4 controller. |
I don't know if this has a connection but when the mapping was done I did: jstest /dev/input/js1 jstest /dev/input/js2 |
I realized that the game doesn't support joysticks well. |
Interesting. InputRemapper does not create those /dev/input/jsX devices directly, so in order to check that InputRemapper works correctly you need to use evtest. Run
when your mapping is correct all your mapped buttons and axes should only show up at the third device. If that does not work, please open a new issue and provide your affected presets ( |
Possibly related to Issue 324
While attempting to use Input-remapper to remap a gaming control pad ( https://store.azeron.eu/index.php?route=extension/azeron_store_design_product/getAllKeypads#keypad=cyborg ) I encountered an issue with joystick pass through.
I built from source using documented steps in the readme:
sudo apt install git python3-setuptools gettext
git clone https://github.com/sezanzeb/input-remapper.git
cd input-remapper && ./scripts/build.sh
sudo apt install ./dist/input-remapper-1.5.0.deb
Steps post install:
--Loaded the game (before applying input-remapper)
--Started input-remapper, selected the game keypad
--set bindings for the action keys
--Swapped to game, confirmed I could move around with the thumb joystick
--swapped to input-remapper and hit Apply
--Swapped back to game, all keymappings set in remapper worked, but joystick no longer functioned
--Hit "stop injection" joystick works again, key remappings are disabled
Possibly relevant:
The setup for the game pad has options for "left joystick" and "Right joystick" which are not available if I select my keyboard from the devices list. Both of these default to "joystick" trying to swap them to mouse/keyboard/wheel have unfortunate consequences like locking my mouse position in the top left corner, constantly zooming in with the mouse wheel, etc.. But the fact it's looking for two joysticks may mean it's detect my device like a two joystick game controller, but I don't see a way to set it to anything else manually. That may not be related anyway.
The text was updated successfully, but these errors were encountered: