39148a77ca
- new external file for joystick configuration - designed for a basic three-axis, three-button joystick; others will require some work ** keyboard.xml - changed back to using index ('n' attribute) to represent key code - switched to nesting for modifiers, so that they can all appear in the same declaration - bound 'b' to brake, but modified so that the brake is released as soon as the button is ** preferences.xml - start mixture at 1.0 (full rich), which is most appropriate for take-off and landing - commented out old joystick bindings - added reference to external joysticks.xml file
116 lines
2.8 KiB
XML
116 lines
2.8 KiB
XML
<?xml version="1.0"?>
|
|
<!--
|
|
Joystick binding definitions.
|
|
|
|
This file is included by preferences.xml, and uses the context of its
|
|
inclusion point; that means that you need to prepend "/input/joysticks"
|
|
to all property names.
|
|
|
|
This file defines primary flight-control bindings for a simple
|
|
three-axis, three-button joystick, as follow:
|
|
|
|
axis 0 (left-right): aileron
|
|
axis 1 (forward-backward): elevator
|
|
axis 2 (slider): throttle
|
|
button 0 (trigger): brakes
|
|
button 1: trim up
|
|
button 2: trim down
|
|
|
|
If you have a more sophisticated joystick, there might be more axes
|
|
available; on my joystick, axis 2 is actually a twist axis (usually
|
|
for the rudder), while axis 3 is the throttle. There are also two
|
|
axes for the hat switch, and several more buttons.
|
|
-->
|
|
|
|
<PropertyList>
|
|
|
|
<js>
|
|
|
|
<axis n="0">
|
|
<desc>Aileron</desc>
|
|
<binding>
|
|
<command>property-scale</command>
|
|
<property>/controls/aileron</property>
|
|
</binding>
|
|
</axis>
|
|
|
|
<axis n="1">
|
|
<desc>Elevator</desc>
|
|
<binding>
|
|
<command>property-scale</command>
|
|
<property>/controls/elevator</property>
|
|
<factor type="double">-1.0</factor>
|
|
</binding>
|
|
</axis>
|
|
|
|
<axis n="2">
|
|
<desc>Throttle</desc>
|
|
<binding>
|
|
<command>property-scale</command>
|
|
<property>/controls/throttle</property>
|
|
<offset type="double">-1.0</offset>
|
|
<factor type="double">-0.5</factor>
|
|
</binding>
|
|
</axis>
|
|
|
|
<button n="0">
|
|
<desc>Brakes</desc>
|
|
<binding>
|
|
<command>property-assign</command>
|
|
<property>/controls/brakes[0]</property>
|
|
<value type="double">1.0</value>
|
|
</binding>
|
|
<binding>
|
|
<command>property-assign</command>
|
|
<property>/controls/brakes[1]</property>
|
|
<value type="double">1.0</value>
|
|
</binding>
|
|
<binding>
|
|
<command>property-assign</command>
|
|
<property>/controls/brakes[2]</property>
|
|
<value type="double">1.0</value>
|
|
</binding>
|
|
<mod-up>
|
|
<binding>
|
|
<command>property-assign</command>
|
|
<property>/controls/brakes[0]</property>
|
|
<value type="double">0.0</value>
|
|
</binding>
|
|
<binding>
|
|
<command>property-assign</command>
|
|
<property>/controls/brakes[1]</property>
|
|
<value type="double">0.0</value>
|
|
</binding>
|
|
<binding>
|
|
<command>property-assign</command>
|
|
<property>/controls/brakes[2]</property>
|
|
<value type="double">0.0</value>
|
|
</binding>
|
|
</mod-up>
|
|
</button>
|
|
|
|
<button n="1">
|
|
<desc>Elevator trim up</desc>
|
|
<repeatable>true</repeatable>
|
|
<binding>
|
|
<command>property-adjust</command>
|
|
<property>/controls/elevator-trim</property>
|
|
<step type="double">0.01</step>
|
|
</binding>
|
|
</button>
|
|
|
|
<button n="2">
|
|
<desc>Elevator trim down</desc>
|
|
<repeatable>true</repeatable>
|
|
<binding>
|
|
<command>property-adjust</command>
|
|
<property>/controls/elevator-trim</property>
|
|
<step type="double">-0.01</step>
|
|
</binding>
|
|
</button>
|
|
|
|
</js>
|
|
|
|
</PropertyList>
|
|
|
|
<!-- end of joysticks.xml -->
|