WhiteMagic / JoystickGremlin

A tool for configuring and managing joystick devices.
http://whitemagic.github.io/JoystickGremlin/
GNU General Public License v3.0
313 stars 46 forks source link

Input Repeater repeats any button press not just Vjoy #257

Open Errant-4 opened 4 years ago

Errant-4 commented 4 years ago

Hello, I am having trouble with the input repeater repeating all events that it last detected, rather than the last Vjoy events:

Pressing Throttle-B9 mapped to vJoy-B15 Expected repeating vJoy-B15 repeats both Throttle-B9 and Vjoy-B15 simultaneously

Holding Throttle-B16 to change mode for Throttle-B9 press, released Throttle-B16 after releasing Throttle-B9 Expected repeating vJoy-B15 repeats Throttle-B16

Holding Throttle-B16 to change mode for Throttle-B9 press, released Throttle-B16 before releasing Throttle-B9 Expected repeating vJoy-B15 repeats Throttle-B9

WhiteMagic commented 4 years ago

A game might see these combined events depending on how the configuration inside is used. However, Gremlin is technically incapable of emitting physical device events. As such if Throttle-BX is a physical input then Gremlin can't possibly emit those to an external program.

There is also an issue with attempting to use the input repeater for complex actions. For example, Gremlin won't behave as expected when the mode is changed via another input. Gremlin will take the last physical input it sees, then wait for a bit to ensure this is the desired input, and then emit fake physical inputs to trigger the associated bindings.

So if you're using the Input Viewer to look at the events, then you will see physical events being created, however, these are not visible outside of Gremlin. Inside of Gremlin, they are used to trigger the actions associated with the corresponding physical input. Though as described above there is no way to have Gremlin trigger the actions associated with complex shift states, mode switches, etc.