You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the two following input remappings:
BTN_TL2 remapped to key_down(BTN_TL2).set(var, 1).hold().set(var, 0).key_up(BTN_TL2)
BTN_NORTH remapped to if_eq($var, 1, key_down(BTN_WEST).hold().key_up(BTN_WEST), key_down(BTN_NORTH).hold().key_up(BTN_NORTH))
For this gamepad, BTN_TL2 is the left trigger, and BTN_NORTH/BTN_WEST are X and Y. Effectively, the left trigger is being used as a modifier to change X to Y when held, while also preserving its input as the left trigger.
However, I was confused when I tested this, as games were reading the remapped inputs as a separate controller. Using https://hardwaretester.com/gamepad I realised that this was because the remapped inputs are coming from the input-remapper gamepad while the untouched ones are coming from a gamepad labelled as 'forwarded'.
Requiring a separate input device to send inputs to rather than the original controller is an understandable technical limitation, however by forwarding the inputs to a separate device, the kind of use case I have with a modifier button is unsuitable.
A potential workaround for this would be to manually remap every button on the gamepad to itself, but I would prefer a simple option to redirect all of the forwarded inputs to the input-remapper gamepad, so that games can properly read all the inputs coming from a singular gamepad.
The text was updated successfully, but these errors were encountered:
We'd could maybe add an option to send all events into an appropriate predefined uinput, like the gamepad.
The original reason why we have those (Gamepad, Mouse, etc.) is, because someone might want to map BTN_A to KEY_A or something, which a gamepad can't inject. If we tell the system that we have a special gamepad that can inject keyboard events (via its "capabilities"), it might not be recognized as a gamepad anymore. And we can't predict what kind of events a mapping will inject, because of variables.
I wonder if we can decide on a per-output-event basis if we want to send it into the "forwarded" device, if that device has said output-event listed in its capabilities. (We would also have to change the name from "gamepad forwarded" to "gamepad clone"). However, all sorts of tests would have to be adjusted if we change where/how events are injected.
Or we add an entry to the target dropdown to allow selecting the clone.
That last option is tempting, because it sounds easy... Which it probably isn't, but at least it sounds easier than the alternatives. Optional functionality shouldn't break any existing tests. And the UI already has all the GTK widgets required for this.
Optional functionality sounds good to me if it won't break tests.
Thanks for the recommendation on hold_keys, I just copied over what I had for BTN_TL2 since it worked fine.
I am using the two following input remappings:
BTN_TL2 remapped to
key_down(BTN_TL2).set(var, 1).hold().set(var, 0).key_up(BTN_TL2)
BTN_NORTH remapped to
if_eq($var, 1, key_down(BTN_WEST).hold().key_up(BTN_WEST), key_down(BTN_NORTH).hold().key_up(BTN_NORTH))
For this gamepad, BTN_TL2 is the left trigger, and BTN_NORTH/BTN_WEST are X and Y. Effectively, the left trigger is being used as a modifier to change X to Y when held, while also preserving its input as the left trigger.
However, I was confused when I tested this, as games were reading the remapped inputs as a separate controller. Using https://hardwaretester.com/gamepad I realised that this was because the remapped inputs are coming from the input-remapper gamepad while the untouched ones are coming from a gamepad labelled as 'forwarded'.
Requiring a separate input device to send inputs to rather than the original controller is an understandable technical limitation, however by forwarding the inputs to a separate device, the kind of use case I have with a modifier button is unsuitable.
A potential workaround for this would be to manually remap every button on the gamepad to itself, but I would prefer a simple option to redirect all of the forwarded inputs to the input-remapper gamepad, so that games can properly read all the inputs coming from a singular gamepad.
The text was updated successfully, but these errors were encountered: