Board index FlightGear Support Hardware

Binding joystick keys

Joysticks, pedals, monitors.

Binding joystick keys

Postby awen » Thu Nov 12, 2020 4:57 am

Hi, I have a Logitech extreme 3D pro Joystick and the Flightgear built in configuration file does most assignments correct. Except a button for toggle all reverser, which does not work on many more complex plane models. Instead, I want to bind that button to the autopilot so I can disconnect AP and AT with a click. How should I edit the joystick configuration file to make this possible? Thanks!

PS. I searched for the pinned threads but cannot find out which code to use.
awen
 
Posts: 93
Joined: Mon Oct 19, 2020 1:39 am
Location: China
Version: 2020.4.0
OS: Windows 11

Re: Binding joystick keys

Postby Johan G » Thu Nov 12, 2020 10:19 am

(Un?)fortunately as aircraft can have a wide range of complexity a lot is left to the aircraft developers, and while there are a lot of common things to bind to there will ultimately be differences between aircraft.

The bindings bind key-value pair properties in the property tree, which kind of is the backbone in FlightGear. You will need to figure out which property to bind to. Likely this will be somewhere in the /controls/engine/ subtree. To find the actual property to bind too use the property browser that is built in into FlightGear and toggle the reversers from other controls to see which property to bind to.

Some bindings can be configured from the joystick configuration dialog, other will need that you open the joystick configuration file in a text editor. The configuration file is an XML file and is located in a subdirectory to ../data/Input/Joystick/ in your FlightGear installation.

Since the normal binding does not seem to work, you might, If you are lucky, find the binding in the aircraft-set.xml file in the root of that aircraft's directory. If you are really unlucky however, the reversers might be controlled by embedded scripts that could be in the aircraft-set.xml file or some of the XML files in ../Aircraft/Aircraft/Models that control the animations.

These FlightGear wiki articles will likely be of help:

Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Binding joystick keys

Postby awen » Thu Nov 12, 2020 2:14 pm

Thank you Johan for your detailed information! It’s kinda sad to not have a universal key in a simulator, but you’re correct that makes more complex systems possible.
awen
 
Posts: 93
Joined: Mon Oct 19, 2020 1:39 am
Location: China
Version: 2020.4.0
OS: Windows 11

Re: Binding joystick keys

Postby Johan G » Thu Nov 12, 2020 10:42 pm

awen wrote in Thu Nov 12, 2020 2:14 pm:Thank you Johan for your detailed information!

You are welcome! :)
awen wrote in Thu Nov 12, 2020 2:14 pm:[...] you’re correct that makes more complex systems possible.

For better or worse, it seems that we have always preferred flexibility over simplicity.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Binding joystick keys

Postby Puffergas » Sun Nov 15, 2020 8:17 pm

Once you get used to using the property tree and the live debug window, it turns out to be more simple than complex. Remember, the joystick file can be reloaded on the fly and the debug window is live. FlightGear is very empowering.
Puffergas
 
Posts: 56
Joined: Thu Jan 02, 2020 2:09 am

Re: Binding joystick keys

Postby Johan G » Mon Nov 16, 2020 2:42 pm

Puffergas wrote in Sun Nov 15, 2020 8:17 pm:FlightGear is very empowering.

Indeed.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit


Return to Hardware

Who is online

Users browsing this forum: No registered users and 5 guests