Ad an Analog 4-axis 4-button joystick configuration
[fg:toms-fgdata.git] / Input / Joysticks / Default / four-axis-joystick.xml
1 <?xml version="1.0"?>
2
3 <!-- 
4 ************************************************************************
5 Default 4-axis joystick bindings.
6
7 Assume that we have a conventional, four-axis, three/four-button
8 joystick, and that the first button is the trigger.
9 ************************************************************************
10 -->
11
12 <PropertyList>
13
14  <name>Analog 4-axis 4-button joystick</name>
15
16  <axis n="0">
17   <desc>Aileron</desc>
18   <binding>
19    <command>property-scale</command>
20    <property>/controls/aileron</property>
21    <squared type="bool">true</squared>
22   </binding>
23  </axis>
24
25  <axis n="1">
26   <desc>Elevator</desc>
27   <binding>
28    <command>property-scale</command>
29    <property>/controls/elevator</property>
30    <factor type="double">-1.0</factor>
31    <squared type="bool">true</squared>
32   </binding>
33  </axis>
34
35  <axis n="2">
36   <desc>Throttle</desc>
37   <binding>
38    <command>property-scale</command>
39    <property>/controls/throttle[0]</property>
40    <offset type="double">-1.0</offset>
41    <factor type="double">-0.5</factor>
42   </binding>
43   <binding>
44    <command>property-scale</command>
45    <property>/controls/throttle[1]</property>
46    <offset type="double">-1.0</offset>
47    <factor type="double">-0.5</factor>
48   </binding>
49  </axis>
50
51  <axis n="3">
52   <binding>
53    <command>property-scale</command>
54    <property>/controls/rudder</property>
55    <squared>true</squared>
56   </binding>
57  </axis>
58
59  <button n="0">
60   <desc>Brakes</desc>
61   <binding>
62    <command>property-assign</command>
63    <property>/controls/brakes[0]</property>
64    <value type="double">1.0</value>
65   </binding>
66   <binding>
67    <command>property-assign</command>
68    <property>/controls/brakes[1]</property>
69    <value type="double">1.0</value>
70   </binding>
71   <binding>
72    <command>property-assign</command>
73    <property>/controls/brakes[2]</property>
74    <value type="double">1.0</value>
75   </binding>
76   <mod-up>
77    <binding>
78     <command>property-assign</command>
79     <property>/controls/brakes[0]</property>
80     <value type="double">0.0</value>
81    </binding>
82    <binding>
83     <command>property-assign</command>
84     <property>/controls/brakes[1]</property>
85     <value type="double">0.0</value>
86    </binding>
87    <binding>
88     <command>property-assign</command>
89     <property>/controls/brakes[2]</property>
90     <value type="double">0.0</value>
91    </binding>
92   </mod-up>
93  </button>
94
95  <button n="1">
96   <desc>Elevator trim up</desc>
97   <repeatable type="bool">true</repeatable>
98   <binding>
99    <command>property-adjust</command>
100    <property>/controls/elevator-trim</property>
101    <step type="double">0.001</step>
102   </binding>
103  </button>
104
105  <button n="2">
106   <desc>Elevator trim down</desc>
107   <repeatable type="bool">true</repeatable>
108   <binding>
109    <command>property-adjust</command>
110    <property>/controls/elevator-trim</property>
111    <step type="double">-0.001</step>
112   </binding>
113  </button>
114
115 </PropertyList>
116
117 <!-- end of joystick.xml -->