MobiFlight Community Support

Welcome to the forum for MobiFlight! Feel free to reach out to the community in case you have questions, issues or just want to share great ideas or details about your latest home cockpit project.

You like MobiFlight? Donate via PayPal and support the MobiFlight development. Thanks! 

05/03/2024 - This forum is read-only

The community support for MobiFlight has moved exclusively over to our Discord server. Register for free and enjoy more interactive functions like image and video upload, voice chat. More than 7,000 registered users around the world make it a great experience!

See you on our MobiFlight Community Discord server.

A HUGE Thank You to everyone who participated in the forum, especially obviously to Pizman and Stephan who did an outstanding job over so many years providing an incredible service to the MobiFlight community.

The forum is still providing a lot of good content, hence we keep this information accessible.

icon
Avatar
pholt
Posts: 3
I've found a way to get a momentary virtual button press with VJoy. I wanted to have a rocker switch send a virtual button when pressed and a different button when released and if you just assign a button to turn on when pressed and another to turn on when released, both buttons will stay on permanently. No good.

After thinking for a while, I came up with idea. I created a new input config item using the same input device, in this case a button, and assigned the opposite functions to it. So config item 1 turns the joystick button on when pressed and config item 2 turns the same button off when pressed. I did the same with the release functions and the result is a momentary press of the virtual button.

It matters in what order you create the configs. You must create the config that turns the button on before the one that turns it off. Otherwise you get a button that produces a momentary off function rather than momentary on.

I hope this helps someone out.
2020-10-04 13:12
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Technical 100% Correct. I would do it same way.
I just request do Sebastian for a better solution here in the future. Looking for a "Momentary Option" .... So we can choose between "ON, OFF and "On-OFF" So we not need this "difficult" improvisional way no longer.

Last Note: Why do you need this ?
If Button is Momentary in Sim.... Would it be not more logical to also use a Momentary here ? then Press ON release OFF will do it.
You can also think about a ONE BUTTON solution....
So 2 Configs. But both Press and Release will use the same Button. Conig 1 set on Press Button x ON .... Config 2 Set on Press Button x OFF . Config 1 Set on Release Button x ON and Config 2 set on Release Button x OFF.
So whatever you set your Switch to ON or OFF .... In Both Cases the SAME Button get Pressed and released shortly behind
Good Luck !
2020-10-05 12:07
Avatar
pholt
Posts: 3
The switches I'm controlling here the avionics bus master 1 & 2 in a C172 panel so they're a rocker switch not a momentary type. I used a joystick button because I wanted to have individual control of the 2 buses and FSUIPC only has a single function which switches both buses together whereas MSFS has an on and off function for the individual buses.
iconQuote:

So 2 Configs. But both Press and Release will use the same Button. Conig 1 set on Press Button x ON .... Config 2 Set on Press Button x OFF . Config 1 Set on Release Button x ON and Config 2 set on Release Button x OFF.
So whatever you set your Switch to ON or OFF .... In Both Cases the SAME Button get Pressed and released shortly behind


No, because I need 2 functions, one joystick button to turn avionics master on and another joystick button to turn off.

screenshot here: https://drive.google.com/file/d/1NyA01E2PYy7s-zpEgEloior49XFuUKaQ/view?usp=sharing
[Last edited by pholt, 2020-10-05 17:05]
2020-10-05 16:53
icon