Jump to content

Sign in to follow this  
Ran

Menu button press & hold using a key shortcut (resolved)

Recommended Posts

Hi team

anyone knows how to enable a repeat of pushing joystick button or sending keyboard shortcut to action the "press and hold" function of the home button?

I switched over to the reality-XP GTN from F1 due to the much easier and reliable keyboard and joystick configuration options.  Only issue I have is that the Menu button 'Press and Hold' function only works when using the mouse on the screen.   I have a dedicated touchscreen unit for the GTN750 so I am using it without the bezel.  

I have tried using a keyboard shortcut mapped in the INI file and a joystick button mapped to GPS Menu button in FSUIPC (with repeat) but to no avail.   The configuration works in terms of the action bringing up the home screen, but holding the button or keyboard shortcut, does not initiate the "Press and Hold" action to go to the map.

obviously this is not a big deal.  I can just as easily go to map once in the home page.   I am just wandering what I missed and doing wrong

any ideas?

 

Regards - Ran

Share this post


Link to post
Share on other sites

Hi,

Keyboard shortcuts are supporting the 'press' event only. When issuing the key press on the keyboard, the device will automatically receive a press then a release event and can't handle long presses.

For more precise press then release actions, I'd suggest you review the "GPS Commands" chapter in the RXP User's Manual (p20). This will allow you mapping any of the standard GPS Flight Simulator commands to work with the GTN with a complete control on press and release actions.


Jean-Luc | reality-xp.com
This message from Reality XP is protected by a disclaimer: reality-xp.com/aboutrealityxp/email.html

Share this post


Link to post
Share on other sites

Thanks for your reply

As I mentioned before, I have tried keyboard mapping, as well as the standard GPS commands.   when using the GPS commands I have:

  • enabled "Use Simulator GPS commands" in the GTN750 gauge settings
  • mapped a joystick button to GPS_Menu_buttton using either FSUIPC set to repeat when held, or directly in the simulator.

and I am getting the same behavior.  Press only, no Press and Release

 

Regards - Ran

 

 

 

Share this post


Link to post
Share on other sites

Please read the RXP user's manual for how to use the default commands are press, press-release, release only. It is detailed with examples.

NB: holding is not repeating.

 


Jean-Luc | reality-xp.com
This message from Reality XP is protected by a disclaimer: reality-xp.com/aboutrealityxp/email.html

Share this post


Link to post
Share on other sites
Posted (edited)

Thanks for that

call me stupid, but I have read the manual, and the examples, several times.  I still cannot work out how to use a single button to apply both "Press" and "Press and hold" actions.

do I need to write an elaborate LUA script for this or is there a simple way?

Regards   - Ran

 

Edited by Ran

Share this post


Link to post
Share on other sites

extract from the manual p20 (please look into the manual, it is using color codes to help matching commands and values):

Command Modifiers

Flight Simulator commands have a parameter which is generally only used for actions requiring a value, like the position of a flap lever. Other actions which toggle or trigger a state change usually pass the value 0. The GTN uses this existing parameter in order to modify the "KEY_GPS" (C++) or the "GPS" (XML) command action. This enhances integration between the GTN and 3D cockpit models, add-ons modules, any other XML or C gauges. The command parameter is interpreted as a bit-field where each binary digit represents a specific modifier:

Bit #2: press and hold the button if set.
Bit #3: release the button if set
.Bit #4: command to GPS unit #2 if set, to GPS unit #1 if clear.

For example:

Sending the HOME key press-release event to GPS#1: GPS_MENU_BUTTON, 0
Sending the HOME key press-release event to GPS#2: GPS_MENU_BUTTON, 8= bit4 (8)
Sending the HOME key press and hold event to GPS#2: GPS_MENU_BUTTON,10= bit2 (2) +bit4 (8)
Sending the HOME key release event to GPS#2: GPS_MENU_BUTTON,12 = bit3 (4) +bit4 (8)

58 minutes ago, Ran said:

do I need to write an elaborate LUA script for this or is there a simple way?

As long as you can bind a standard Flight Simulator command (GPS_MENU_BUTTON) to a key and have the tool you're using to make this binding to not only send the command, but to also send it with a value (12 for release), the 'logic' behind all this is all documented above and there is nothing more needed.

You're looking to map a hardware key (keyboard) to a standard Flight Simulator command first and foremost. I don't know to which extent of the tool you'll use to make the binding can also be configured to send values along (FSUIPC?)

 


Jean-Luc | reality-xp.com
This message from Reality XP is protected by a disclaimer: reality-xp.com/aboutrealityxp/email.html

Share this post


Link to post
Share on other sites

This can all be done in Spad.NExt....Excellent tool along with the Reality XP products.

  • Like 1

Les O'Reilly

Share this post


Link to post
Share on other sites

@RXP I may be stupid, but not that stupid, so please stop pointing me to the manual which is not much help at all.

How can I map a single button to two different actions using either the direct mapping in the sim or in FSUIPC (without the need to write an LUA script)?

I have mapped the button to the GPS_Home_Button and yes the default setting sends 0 as the value, which is Press only according to the manual, right? - so how can I use the SAME button to send the Press and Hold value when holding the button (using in sim button to action mapping) ? - obviously I cannot, so just say so.

I'll look at SPAD.next

Ran

 

 

Share this post


Link to post
Share on other sites

 Hi Ran,

Sending the HOME key press-release event to GPS#1: GPS_MENU_BUTTON, 0
Sending the HOME key press-release event to GPS#2: GPS_MENU_BUTTON, 8= bit4 (8)
Sending the HOME key press and hold event to GPS#2: GPS_MENU_BUTTON,10= bit2 (2) +bit4 (8)
Sending the HOME key release event to GPS#2: GPS_MENU_BUTTON,12 = bit3 (4) +bit4 (8)

 

12 hours ago, Ran said:

I have mapped the button to the GPS_Home_Button and yes the default setting sends 0 as the value, which is Press only according to the manual, right?

0 is press and release (default).

There is no "sending anything when holding the button". There is instead:

  • "send press when pressing the button"
  • "send release when releasing the button"
  • "do not send anything while holding the button".

I believe FSUIPC support would be best answering such question about how to make their program do specific actions, or better said, how to configure FSUIPC to send an event with a value upon either pressing or releasing a button.


Jean-Luc | reality-xp.com
This message from Reality XP is protected by a disclaimer: reality-xp.com/aboutrealityxp/email.html

Share this post


Link to post
Share on other sites
Posted (edited)

In addition, using google search with "site:avsim.com RXP FSUIPC HOME BUTTON" gives:

https://www.google.com/search?q=site%3Aavsim.com+RXP+FSUIPC+HOME+BUTTON

Which further leads to:

and this one (which is also pinned in our GNS Fltsim forum):

might be worth reading too!

Edited by RXP

Jean-Luc | reality-xp.com
This message from Reality XP is protected by a disclaimer: reality-xp.com/aboutrealityxp/email.html

Share this post


Link to post
Share on other sites

Thank you @RXP

So just to get this topic back on track. 

The initial question was whether it was possible to use a keyboard or button mapping to provide both "Press" and "Press & Hold" functionality of the GTN Home button without scripting.  I now understand that the answer is "you can't".  that's all I needed to know.

I have both the RXP GNS and GTN, and have successfully mapped all buttons to matching functions either directly in the SIM and/or using FSUIPC & Mobiflight which drives the arduino board that all buttons, encoders etc are connected to.

The GTN Home button is the only button that has dual functionality, and hence my question.   Now that I know that key or button mapping does not work for both "Press" and "Press & Hold", I'll look at an Lua option such as the TripleUse.Lua script.

Thanks again - Ran 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
  • Donation Goals

    AVSIM's 2020 Fundraising Goal

    Donate to our annual general fundraising goal. This donation keeps our doors open and providing you service 24 x 7 x 365. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. We reset this goal every new year for the following year's goal.


    22%
    $5,605.00 of $25,000.00 Donate Now
×
×
  • Create New...