Input device: Difference between revisions

Jump to navigation Jump to search
m
Updated to mention the ability to reload settings without restarting the program
m (moved Joystick to Input device: The article covers not just joysticks, but any kind of input device.)
m (Updated to mention the ability to reload settings without restarting the program)
Line 316: Line 316:
* One of the most common errors is including a character that makes XML choke. Such characters include<br>& < --<br>These characters will cause problems even if simply included in comments or within scripts.
* One of the most common errors is including a character that makes XML choke. Such characters include<br>& < --<br>These characters will cause problems even if simply included in comments or within scripts.
* If your scripts contain any of these characters, you have to enclose the scripts in <script><![CDATA[...]]></script>. Alternatively, you can 'escape' the characters, ie "<" becomes "&lt;".
* If your scripts contain any of these characters, you have to enclose the scripts in <script><![CDATA[...]]></script>. Alternatively, you can 'escape' the characters, ie "<" becomes "&lt;".
* Note that as of ver 1.9.1 there appears to be no way to tell FlightGear to reload joystick files at runtime. So to test any changes to your file you must exit FlightGear and re-start, a somewhat time-consuming process.
* You can reload your edited joystick file without restarting FlightGear by selecting "Debug" &gt; "Reload Input" from the main simulator window.
* You can find many examples of different ways to program joysticks simply by examining the joystick xml files that are packaged with FlightGear. See the directory FlightGear/data/input/joysticks
* You can find many examples of different ways to program joysticks simply by examining the joystick xml files that are packaged with FlightGear. See the directory FlightGear/data/input/joysticks
* Many advanced functions can be programmed using the Nasal scripting language. These scripts are enclosed in <script></script> tags in the XML file. Helpful:
* Many advanced functions can be programmed using the Nasal scripting language. These scripts are enclosed in <script></script> tags in the XML file. Helpful:
21

edits

Navigation menu