sezanzeb / input-remapper

🎮 ⌨ An easy to use tool to change the behaviour of your input devices.
GNU General Public License v3.0
3.82k stars 158 forks source link

Map + and - input axis values to different output axes #900

Open TRPB opened 5 months ago

TRPB commented 5 months ago

I'm trying to play GTA Vice City Definitive edition (I know :joy: ), the PC controls for flying are basically broken by design but an xbox controller works. I don't have or want an xbox controller but I do have a joystick.

The problem is, that the Ascend/Descend controls are two different axis on the controler (trigger left/trigger right).

I'd like to map the joystick's throttle control which goes from -32768 to +32768 so that positive values map onto a gamepad's RZ and negative values map onto the RY axis (or any two axis),

(I can then use xboxdrv to map to virtural controller to the xbox controller used in game which is a bit of a pain but works)

Is there any way to do this? It works fine with buttons, positive values can map onto one key where negatives map onto a different key but it doesn't seem possible with axis.

The-Darumonkey commented 3 months ago

This is an issue for me too.

In Elite: Dangerous, one can map any axis to any axis defined by the game. This is great - it's a very flexible design.

However, Input Remapper (or whatever it's sitting on) defines some axes as triggers, meaning -32768 maps to 0 on those axes.

To my mind, there are three solutions:

  1. Stop defining certain axes in the app as "triggers" by default. Let the user define what the outputs do.
  2. Allow an offset on the to-be-mapped axis that sets a mid-point for the axis and halves the inputs, so that 1=32768, 0=16384, and -1=0.
  3. Enable the app to spawn more than one virtual gamepad.

The 3rd option would be perfect for Elite: Dangerous, which doesn't really care how many input devices you have attached to the machine it's running on.