ashupp / Streamdeck-vJoy

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

Thanks! and request #1

Closed muchimi closed 4 years ago

muchimi commented 4 years ago

This is exactly what I was looking for - thanks for making this.

Couple of feature suggestions:

Thanks!

ashupp commented 4 years ago

Hello and thank you.

May i ask for which game/app are you using this tool? And does it actually work - also over some time? Because I have not tested the plugin extensively :)

On your suggestions - these are actually great ideas. I will have a look at it.

Best regards

ashupp commented 4 years ago

@muchimi Check out the new release and tell me if this works for you. The axis behaviour seems a bit strange to me... https://github.com/ashupp/Streamdeck-vJoy/releases/tag/0.0.1.1

Best regards, Alex

muchimi commented 4 years ago

Will do, thanks for making the additions. I use the deck for a number of flight simulations. X-plane, Star Citizen among others. I have several controllers joined via Joystick Gremlin, including some hardware panels. The stream deck is a new addition so having the ability to output joystick buttons and axes is very helpful to help control some aspects of the sim. Example, flaps, trim. I also use supermacros for the keyboard side of things. Having the ability to output VJOY items was the missing link.

ashupp commented 4 years ago

Ah i understand - in the first place i created this plugin for simracing. but in the meantime i have mapped all my needs to keyboard shortcuts. So i am using it no longer right now. I didnt know Joystick Gremlin - very interesting. Sounds like you have a serious flight rig there :)

muchimi commented 4 years ago

I tried version 1.1. Perfect - button press/release and the axis min/max/center.

One of the needs in flight sim is to "nudge" or set a specific value on the axis. Example: 5% of total travel if your mapping is a power output, vs 25% or whatever is needed. So not always min/max/center. Gremlin uses -1 to +1 with 0 as the center, and the values expressed as floating point, so -0.9 would be 5%. Any way to accept a number value for an axis output and use that as the output?

ashupp commented 4 years ago

Thank you for the feedback. I will have a look at it. An easy way would be to just put a desired number for axis value when pressed. Possible value for each axis is 0-65535. Would this already fit your needs?

muchimi commented 4 years ago

Yep that works. This way a press can set a value temporarily, and then reset the value to another when released. Excellent to "pulse" something like a thruster or a control surface like a trim.

I was also thinking icing on the cake would be for a mode to "add" a value to the current axis. A positive number or a negative number. Good example of this would be a flap. Press one button to add 10%, press another to remove 10%. No effect below 0 or higher than 0xFFFF (65535).

ashupp commented 4 years ago

Check out the new release: https://github.com/ashupp/Streamdeck-vJoy/releases/tag/0.0.1.3 When using step up or step down you should first check "do nothing" on button release so the step is not reset when releasing the button.

But of course you could step up 1000 on press and step down 500 on release. I dont know if this makes any sense :) You can also perform a press and hold until its released combined with stepper this way.

Note: currently the stepper values of an axis are not changed when pushing the axis with another button to max and to min or to custom. Question: Would it be better if these values were connected?

Many possibilitys - send me the pluginlog.log inside the plugin directory if something does not work as intended. Also try if deleting and re-creating the button new solves a temporary problem. (Restart of Streamdeck does also somtimes)

benkayuk commented 4 years ago

Just to say...I've been looking for a way for StreamDeck to issue game controller presses since day 1. SimDeck I didn't like so much, but your plugin works perfectly...I couldn't be happier and it makes the StreamDeck the perfect button box!

muchimi commented 4 years ago

Alexander - your new release worked just fine. I was in fact able to use the Streamdeck to send output to a VJOY device, and use that as an input inside Joystick Gremlin which is terrific. I'll let the Gremlin crew know because this is the first time I think I've seen that work. Cheers!

ashupp commented 4 years ago

Thank you for the information. Great to see the plugin is working for you and hopefully a lot more people.

During fixing the sticky buttons issue in 0.0.1.4 i have noticed another behaviour:

The first time you click a button the value of a vjoy device all available axis of the device will be set to 0. Did you notice this behaviour? Actually this is a problem for me in at least one Game. (Project Cars 2). Or is this smoothed because you are using Joystick Gremlin?

Thank you and best regards, Alex

muchimi commented 4 years ago

Yes it does set it to zero the first time. You have to give it a default value - usually 50%. When a profile is started in Gremlin, this is set for you. Perhaps setting a default value when the plugin / profile is loaded?

It's not a problem for me because Gremlin will set the default on the output (it's part of the profile settings - what do you want to use as default values for the profile when it loads initially) - and only read the value on the virtual input stick if it changes - which it won't until a button is pressed.

So my output isn't impacted by this right now. I can see some scenarios where it would.

My setup right now is:

Streamdeck -> VJOY #4 (used as input to) -> Gremlin -> VJOY devices #1, #2 and #3 used as outputs. Gremlin also captures input from a bunch of other joysticks for my home cockpit. The reason I use it is outside of its combining capabilities, I also run custom Python plugins for Gremlin for more complex input scenarios that are impossible (or very hard to do). In that respect, Gremlin is many times more capable than any macro or programming capability in the Streamdeck. One such example is I use an axis on one controller to "scale" the response of another controller. This is helpful in space simulators when precision flying is needed (such as when landing or navigating a tight spot in 6 DOF situations ).

muchimi commented 4 years ago

Alex - I have one more question for you. The "step up" and "step down" function works well, but when I have a third button to re-center, the step up/step down values don't get reset (it doesn't re-read the axis). What I was thinking is that if you recenter the axis, the step up/down functions should be not from the last step up or down, but from the current axis position. This is also true if I modify the axis in question from some other function.

What I'm experiencing right now is that the step functions are working together, but ignore any centering.

Does that make sense?

Regards,

EM

On Tue, Dec 3, 2019 at 5:27 PM Alexander Hupp notifications@github.com wrote:

Thank you for the information. Great to see the plugin is working for you and hopefully a lot more people.

During fixing the sticky buttons issue in 0.0.1.4 i have noticed another behaviour:

The first time you click a button the value of a vjoy device all available axis of the device will be set to 0. Did you notice this behaviour? Actually this is a problem for me in at least one Game. (Project Cars 2). Or is this smoothed because you are using Joystick Gremlin?

Thank you and best regards, Alex

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ashupp/Streamdeck-vJoy/issues/1?email_source=notifications&email_token=AHWHM66JLV3KAX2OU6CWLFLQW3MMVA5CNFSM4JPSVOZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF3BDAA#issuecomment-561385856, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHWHM6324ZOOXMV2ZCXYVFDQW3MMVANCNFSM4JPSVOZQ .

muchimi commented 4 years ago

Sorry Alex! Me again.

I decided to fork the project so I could play with the code without messing your stuff up. I added a few changes to fix the issue I was having that I think are doing the trick

https://github.com/muchimi/Streamdeck-vJoy

A next step would be to have sticky keys - meaning - step up and step down constantly applied on tick() as long as the button is pressed.

On Sat, Feb 8, 2020 at 2:47 PM Etienne Martin etienne.martin.emcs@gmail.com wrote:

Alex - I have one more question for you. The "step up" and "step down" function works well, but when I have a third button to re-center, the step up/step down values don't get reset (it doesn't re-read the axis). What I was thinking is that if you recenter the axis, the step up/down functions should be not from the last step up or down, but from the current axis position. This is also true if I modify the axis in question from some other function.

What I'm experiencing right now is that the step functions are working together, but ignore any centering.

Does that make sense?

Regards,

EM

On Tue, Dec 3, 2019 at 5:27 PM Alexander Hupp notifications@github.com wrote:

Thank you for the information. Great to see the plugin is working for you and hopefully a lot more people.

During fixing the sticky buttons issue in 0.0.1.4 i have noticed another behaviour:

The first time you click a button the value of a vjoy device all available axis of the device will be set to 0. Did you notice this behaviour? Actually this is a problem for me in at least one Game. (Project Cars 2). Or is this smoothed because you are using Joystick Gremlin?

Thank you and best regards, Alex

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ashupp/Streamdeck-vJoy/issues/1?email_source=notifications&email_token=AHWHM66JLV3KAX2OU6CWLFLQW3MMVA5CNFSM4JPSVOZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF3BDAA#issuecomment-561385856, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHWHM6324ZOOXMV2ZCXYVFDQW3MMVANCNFSM4JPSVOZQ .

ashupp commented 4 years ago

Hello,

thank you for the request. I think i asked this question on nov. 22. if it would be better if the axis could be manipulated by another button as well :) Great you solved it already.

You are welcome to extend the functionality 👍 Great!.

It could take some weeks for me to check the things again and push the project further as i am currently involved in another project.

Best regards, Alex

SierraDelta7 commented 4 years ago

Hi Alex,

I hope this message finds you well. First, I would like to thank you for your excellent work. I love this plugin.

Like Muchimi, I am using vJoy with X-Plane 11 to control various simulation functions. I have one small issue however. With your plugin (ver 0.0.1.4) I am not able to add vJoy actions to StreamDeck multi-action buttons or switches. Have I done something incorrectly?

Lastly, I would like to add myself to the list of people that would use a "latching" button function. I would contribute myself if I had the skills.

Best regards.

ashupp commented 4 years ago

@SierraDelta7 Hello and thank you. I have enabled the Plugin for Multi-Actions. Please give it a try and tell me if this works for you. https://github.com/ashupp/Streamdeck-vJoy/releases/tag/0.0.1.5

Could you describe detailed what kind of functionality you mean with "latching"? Is this not already covered by the "Push and hold" / "Release" functionality when using Type "Button"?

Best regards, Alex

SierraDelta7 commented 4 years ago

Hi Alex, That was fast! The 0.0.1.5 release seems to work perfectly.

The latching function would allow the first press of a button to hold the vJoy button down. A second press of the same button would release the vJoy button.

Adding the multi-action functionality is a work-around because you already have the push & hold / release functions built in. I can make steps for the push/hold and release. Before you enabled the multi-action function I would have used two separate buttons on my streamdeck. One for the push/hold the vJoy button and the second to release that vJoy button.

Thanks again for your work on this project, its fantastic!

muchimi commented 4 years ago

For what it's worth - I do this via joystick gremlin because latching and other advanced control behavior was a bit beyond "get the streamdeck to output a button". Anything along the lines of long press vs short press and toggle - I find it much easier to do inside gremlin as it has built-in features for this. My mapping is streamdeck -> vjoy 4 -> gremlin -> vjoy 1 to 3 -> simulation titles. Gremlin also handles my other input devices (yoke, pedals, throttle, sticks) so I can easily change configurations per aircraft, or per simulator I use.

This is another option that doesn't require changes to the plugin.

Cheers,

M

On Thu, Apr 9, 2020 at 8:08 PM SierraDelta7 notifications@github.com wrote:

Hi Alex, That was fast! The 0.0.1.5 release seems to work perfectly.

The latching function would allow the first press of a button to hold the vJoy button down. A second press of the same button would release the vJoy button.

Adding the multi-action functionality is a work-around because you already have the push & hold / release functions built in. I can make steps for the push/hold and release. Before you enabled the multi-action function I would have used two separate buttons on my streamdeck. One for the push/hold the vJoy button and the second to release that vJoy button.

Thanks again for your work on this project, its fantastic!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ashupp/Streamdeck-vJoy/issues/1#issuecomment-611810926, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHWHM627VQ7GQR6N3SKDLKTRLZPOPANCNFSM4JPSVOZQ .

ashupp commented 4 years ago

Thanks for your help muchimi. joystick gremlin seems to be such a useful tool since it can handle so many stuff the plugin currently doesent :)

I added an additional action for simple latching button / toggle. This is currently only for button - no axis or specific values yet. But - since i used states you can use different images for on/off.

New release here: https://github.com/ashupp/Streamdeck-vJoy/releases/tag/0.0.1.6 Please read warning before install.

happy easter and best regards, Alex