3 Mouse binding definitions.
5 This is a independent configuration file: it is not part of the main
6 FlightGear property tree.
8 Currently, Glut supports only one mouse, but the configuration format
9 is designed to support additional mice in the future if possible. The
10 current mode for each mouse is held in the
11 /devices/status/mice/mouse[n]/mode property.
18 <mode-count type="int">3</mode-count>
19 <mode archive="y" type="int">0</mode>
23 <cursor>inherit</cursor>
24 <constrained type="bool">false</constrained>
25 <pass-through type="bool">true</pass-through>
29 <command>property-assign</command>
30 <property>/devices/status/mice/mouse[0]/mode</property>
31 <value type="int">1</value>
35 <!-- extra buttons control elevator trim -->
36 <!-- these are often assigned to mouse-wheel motion in Linux -->
39 <command>property-adjust</command>
40 <property>/controls/flight/elevator-trim</property>
41 <step type="double">0.002</step>
47 <command>property-adjust</command>
48 <property>/controls/flight/elevator-trim</property>
49 <step type="double">-0.002</step>
56 <cursor>crosshair</cursor>
57 <constrained type="bool">true</constrained>
58 <pass-through type="bool">false</pass-through>
62 <command>property-assign</command>
63 <property>/devices/status/mice/mouse[0]/mode</property>
64 <value type="int">2</value>
68 <!-- extra buttons control elevator trim -->
69 <!-- these are often assigned to mouse-wheel motion in Linux -->
72 <command>property-adjust</command>
73 <property>/controls/flight/elevator-trim</property>
74 <step type="double">0.01</step>
80 <command>property-adjust</command>
81 <property>/controls/flight/elevator-trim</property>
82 <step type="double">-0.01</step>
86 <!-- Mouse left/right motion. -->
89 <!-- No buttons pressed: control ailerons -->
94 <property>/devices/status/mice/mouse[0]/button[0]</property>
97 <property>/devices/status/mice/mouse[0]/button[1]</property>
101 <command>property-adjust</command>
102 <property>/controls/flight/aileron</property>
103 <factor type="double">4.0</factor>
104 <min type="double">-1.0</min>
105 <max type="double">1.0</max>
106 <wrap type="bool">false</wrap>
109 <!-- Left button pressed: control rudder -->
113 <property>/devices/status/mice/mouse[0]/button[0]</property>
115 <property>/devices/status/mice/mouse[0]/button[1]</property>
119 <command>property-adjust</command>
120 <property>/controls/flight/rudder</property>
121 <factor type="double">4.0</factor>
122 <min type="double">-1.0</min>
123 <max type="double">1.0</max>
124 <wrap type="bool">false</wrap>
129 <!-- Mouse up/down motion -->
132 <!-- No buttons pressed: control elevator -->
137 <property>/devices/status/mice/mouse[0]/button[0]</property>
140 <property>/devices/status/mice/mouse[0]/button[1]</property>
144 <command>property-adjust</command>
145 <property>/controls/flight/elevator</property>
146 <factor type="double">-4.0</factor>
147 <min type="double">-1.0</min>
148 <max type="double">1.0</max>
149 <wrap type="bool">false</wrap>
152 <!-- Middle button pressed: control throttle -->
154 <command>nasal</command>
155 <script>controls.throttleMouse()</script>
161 <!-- Mode 2: view mode -->
163 <cursor>left-right</cursor>
164 <constrained type="bool">true</constrained>
165 <pass-through type="bool">false</pass-through>
167 <!-- left button centres view direction; middle + left also resets view point -->
170 <command>nasal</command>
178 <property>/devices/status/mice/mouse[0]/button[1]</property>
180 <command>nasal</command>
187 <!-- right button switches modes -->
190 <command>property-assign</command>
191 <property>/devices/status/mice/mouse[0]/mode</property>
192 <value type="int">0</value>
196 <!-- extra buttons control elevator trim -->
197 <!-- these are often assigned to mouse-wheel motion in Linux -->
200 <command>property-adjust</command>
201 <property>/controls/flight/elevator-trim</property>
202 <step type="double">0.01</step>
208 <command>property-adjust</command>
209 <property>/controls/flight/elevator-trim</property>
210 <step type="double">-0.01</step>
214 <!-- Mouse left/right motion -->
217 <!-- No buttons pressed: rotate the view left or right -->
222 <property>/devices/status/mice/mouse[0]/button[0]</property>
225 <property>/devices/status/mice/mouse[0]/button[1]</property>
229 <command>property-adjust</command>
230 <property>/sim/current-view/heading-offset-deg</property>
231 <factor type="double">-360</factor>
232 <min type="double">0</min>
233 <max type="double">360</max>
234 <wrap type="bool">true</wrap>
238 <!-- Middle button pressed: move the view position left or right -->
243 <property>/devices/status/mice/mouse[0]/button[0]</property>
245 <property>/devices/status/mice/mouse[0]/button[1]</property>
248 <command>property-adjust</command>
249 <property>/sim/current-view/x-offset-m</property>
250 <factor type="double">1</factor>
251 <wrap type="bool">false</wrap>
256 <!-- Mouse up/down motion -->
259 <!-- No buttons pressed: tilt the view up and down -->
264 <property>/devices/status/mice/mouse[0]/button[0]</property>
267 <property>/devices/status/mice/mouse[0]/button[1]</property>
271 <command>property-adjust</command>
272 <property>/sim/current-view/pitch-offset-deg</property>
273 <factor type="double">-180</factor>
274 <min type="double">-90</min>
275 <max type="double">90</max>
276 <wrap type="bool">false</wrap>
279 <!-- Middle button pressed, no Ctrl: move the view up and down -->
284 <property>/devices/status/mice/mouse[0]/button[0]</property>
286 <property>/devices/status/mice/mouse[0]/button[1]</property>
288 <property>/devices/status/keyboard/ctrl</property>
292 <command>property-adjust</command>
293 <property>/sim/current-view/y-offset-m</property>
294 <factor type="double">-1</factor>
295 <wrap type="bool">false</wrap>
298 <!-- Middle button and Ctrl pressed: move the view forward and backward -->
303 <property>/devices/status/mice/mouse[0]/button[0]</property>
305 <property>/devices/status/mice/mouse[0]/button[1]</property>
306 <property>/devices/status/keyboard/ctrl</property>
309 <command>property-adjust</command>
310 <property>/sim/current-view/z-offset-m</property>
311 <factor type="double">1</factor>
312 <wrap type="bool">false</wrap>