ashupp / Streamdeck-vJoy

Map elgato stream deck buttons to vJoy buttons
GNU General Public License v3.0
67 stars 5 forks source link

Button Toggle option doesn't appear to work #6

Open edmooredop opened 4 years ago

edmooredop commented 4 years ago

My expectation was that I would be able to set different vJoy Button Numbers for the "on" and "off" states of the toggle button option when creating buttons in the Streamdeck app.

Whilst the Title field does appear to save changes between on and off, the button number doesn't (nor does the device ID).

calmacase commented 3 years ago

I have the same issue here, and it would be awesome if this could be fixed. This is by far one of my most used plugins!

ashupp commented 3 years ago

Hello, sorry for the delayed answer.

The Button toggle is just for toggling a single button of a vjoy device on and off. It seems except for the title it is not possible to set different variables depending on toggle state by the Stream deck api.

But i am curious - what would be a scenario where a functionality like this would be necessary. I mean - you would push one specific button on first state and release another button maybe on even another vjoy device on another.

I think your desired functionality could be solved by using the normal vjoy button using the push and hold and release actions and / or by using the vjoy button with the "Multi-Action" found in "Stream Deck" folder.

edmooredop commented 3 years ago

It's been a while since I was playing with it but I believe the issue was that in X-Plane there are various aircraft controls that can only be bound to one joystick button. So for example you might have an 'autopilot on' button that can be bound , and an 'autopilot off' one. It makes logical sense for this to be on one streamdeck button as the autopilot can only ever be on or off.

ashupp commented 3 years ago

thanks for the answer. i see, that makes sense! Interesting i had exactly the issue yesterday while mapping actions from MSFS2020 to my throttle :)

Well currently you can not do this easy via the normal api provided by streamdeck. And that is not how that simple "latching" button was intended to work.

But a solution that would work is: Use the streamdeck included multi-action-toggle. You can perform multiple actions per state change. For example push and hold a button and release it later. And on the other state do the same with another button id. For some reason this does not work currently with push and release - the "button down" - time seems to be too short when used in multi action. I have put this on my list.

This is how it works. image image