- change default throttle binding to move both throttle 0 and throttle
[fg:toms-fgdata.git] / joysticks.xml
1 <?xml version="1.0"?>
2 <!--
3 Joystick binding definitions.
4
5 This file is included by preferences.xml, and uses the context of its
6 inclusion point; that means that you need to prepend "/input/joysticks"
7 to all property names.
8
9 This file defines primary flight-control bindings for a simple
10 three-axis, three-button joystick, as follow:
11
12   axis 0 (left-right): aileron
13   axis 1 (forward-backward): elevator
14   axis 2 (slider): throttle
15   button 0 (trigger): brakes
16   button 1: trim up
17   button 2: trim down
18
19 If you have a more sophisticated joystick, there might be more axes
20 available; on my joystick, axis 2 is actually a twist axis (usually
21 for the rudder), while axis 3 is the throttle.  There are also two
22 axes for the hat switch, and several more buttons.
23 -->
24
25 <PropertyList>
26
27  <js>
28
29   <axis n="0">
30    <desc>Aileron</desc>
31    <binding>
32     <command>property-scale</command>
33     <property>/controls/aileron</property>
34    </binding>
35   </axis>
36
37   <axis n="1">
38    <desc>Elevator</desc>
39    <binding>
40     <command>property-scale</command>
41     <property>/controls/elevator</property>
42     <factor type="double">-1.0</factor>
43    </binding>
44   </axis>
45
46   <axis n="2">
47    <desc>Throttle</desc>
48    <binding>
49     <command>property-scale</command>
50     <property>/controls/throttle[0]</property>
51     <offset type="double">-1.0</offset>
52     <factor type="double">-0.5</factor>
53    </binding>
54    <binding>
55     <command>property-scale</command>
56     <property>/controls/throttle[1]</property>
57     <offset type="double">-1.0</offset>
58     <factor type="double">-0.5</factor>
59    </binding>
60   </axis>
61
62   <button n="0">
63    <desc>Brakes</desc>
64    <binding>
65     <command>property-assign</command>
66     <property>/controls/brakes[0]</property>
67     <value type="double">1.0</value>
68    </binding>
69    <binding>
70     <command>property-assign</command>
71     <property>/controls/brakes[1]</property>
72     <value type="double">1.0</value>
73    </binding>
74    <binding>
75     <command>property-assign</command>
76     <property>/controls/brakes[2]</property>
77     <value type="double">1.0</value>
78    </binding>
79    <mod-up>
80     <binding>
81      <command>property-assign</command>
82      <property>/controls/brakes[0]</property>
83      <value type="double">0.0</value>
84     </binding>
85     <binding>
86      <command>property-assign</command>
87      <property>/controls/brakes[1]</property>
88      <value type="double">0.0</value>
89     </binding>
90     <binding>
91      <command>property-assign</command>
92      <property>/controls/brakes[2]</property>
93      <value type="double">0.0</value>
94     </binding>
95    </mod-up>
96   </button>
97
98   <button n="1">
99    <desc>Elevator trim up</desc>
100    <repeatable>true</repeatable>
101    <binding>
102     <command>property-adjust</command>
103     <property>/controls/elevator-trim</property>
104     <step type="double">0.001</step>
105    </binding>
106   </button>
107
108   <button n="2">
109    <desc>Elevator trim down</desc>
110    <repeatable>true</repeatable>
111    <binding>
112     <command>property-adjust</command>
113     <property>/controls/elevator-trim</property>
114     <step type="double">-0.001</step>
115    </binding>
116   </button>
117
118  </js>
119
120 </PropertyList>
121
122 <!-- end of joysticks.xml -->