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">4</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>
30 <property>/sim/menubar/autovisibility/enabled</property>
32 <command>property-assign</command>
33 <property>/sim/menubar/visibility</property>
34 <value type="bool">false</value>
40 <command>cycle-mouse-mode</command>
41 <reason>right-click</reason>
48 <cursor>crosshair</cursor>
49 <constrained type="bool">true</constrained>
50 <pass-through type="bool">false</pass-through>
54 <command>cycle-mouse-mode</command>
55 <reason>right-click</reason>
59 <!-- extra buttons control elevator trim -->
60 <!-- these are often assigned to mouse-wheel motion in Linux -->
63 <command>property-adjust</command>
64 <property>/controls/flight/elevator-trim</property>
65 <step type="double">0.01</step>
71 <command>property-adjust</command>
72 <property>/controls/flight/elevator-trim</property>
73 <step type="double">-0.01</step>
77 <!-- Mouse left/right motion. -->
80 <!-- No buttons pressed: control ailerons -->
85 <property>/devices/status/mice/mouse[0]/button[0]</property>
88 <property>/devices/status/mice/mouse[0]/button[1]</property>
92 <command>property-adjust</command>
93 <property>/controls/flight/aileron</property>
94 <factor type="double">4.0</factor>
95 <min type="double">-1.0</min>
96 <max type="double">1.0</max>
97 <wrap type="bool">false</wrap>
100 <!-- Left button pressed: control rudder -->
104 <property>/devices/status/mice/mouse[0]/button[0]</property>
106 <property>/devices/status/mice/mouse[0]/button[1]</property>
110 <command>property-adjust</command>
111 <property>/controls/flight/rudder</property>
112 <factor type="double">4.0</factor>
113 <min type="double">-1.0</min>
114 <max type="double">1.0</max>
115 <wrap type="bool">false</wrap>
120 <!-- Mouse up/down motion -->
123 <!-- No buttons pressed: control elevator -->
128 <property>/devices/status/mice/mouse[0]/button[0]</property>
131 <property>/devices/status/mice/mouse[0]/button[1]</property>
135 <command>property-adjust</command>
136 <property>/controls/flight/elevator</property>
137 <factor type="double">-4.0</factor>
138 <min type="double">-1.0</min>
139 <max type="double">1.0</max>
140 <wrap type="bool">false</wrap>
143 <!-- Middle button pressed: control throttle -->
145 <command>nasal</command>
146 <script>controls.throttleMouse()</script>
152 <!-- Mode 2: view mode -->
154 <cursor>left-right</cursor>
155 <constrained type="bool">true</constrained>
156 <pass-through type="bool">false</pass-through>
158 <!-- left button centres view direction; middle + left also resets view point -->
161 <command>nasal</command>
169 <property>/devices/status/mice/mouse[0]/button[1]</property>
171 <command>nasal</command>
178 <!-- right button switches modes -->
181 <command>cycle-mouse-mode</command>
182 <reason>right-click</reason>
187 <!-- extra buttons control FoV -->
188 <!-- these are often assigned to mouse-wheel motion in Linux -->
191 <command>nasal</command>
192 <script>view.decrease()</script>
198 <command>nasal</command>
199 <script>view.increase()</script>
203 <!-- Mouse left/right motion -->
206 <!-- No buttons pressed: rotate the view left or right -->
211 <property>/devices/status/mice/mouse[0]/button[0]</property>
214 <property>/devices/status/mice/mouse[0]/button[1]</property>
218 <command>property-adjust</command>
219 <property>/sim/current-view/heading-offset-deg</property>
220 <factor type="double">-360</factor>
221 <min type="double">0</min>
222 <max type="double">360</max>
223 <wrap type="bool">true</wrap>
227 <!-- Middle button pressed: move the view position left or right -->
232 <property>/devices/status/mice/mouse[0]/button[0]</property>
234 <property>/devices/status/mice/mouse[0]/button[1]</property>
237 <command>property-adjust</command>
238 <property>/sim/current-view/x-offset-m</property>
239 <factor type="double">1</factor>
240 <wrap type="bool">false</wrap>
245 <!-- Mouse up/down motion -->
248 <!-- No buttons pressed: tilt the view up and down -->
253 <property>/devices/status/mice/mouse[0]/button[0]</property>
256 <property>/devices/status/mice/mouse[0]/button[1]</property>
260 <command>property-adjust</command>
261 <property>/sim/current-view/pitch-offset-deg</property>
262 <factor type="double">-180</factor>
263 <min type="double">-90</min>
264 <max type="double">90</max>
265 <wrap type="bool">false</wrap>
268 <!-- Middle button pressed move the view up and down -->
273 <property>/devices/status/mice/mouse[0]/button[0]</property>
275 <property>/devices/status/mice/mouse[0]/button[1]</property>
278 <command>property-adjust</command>
279 <property>/sim/current-view/y-offset-m</property>
280 <factor type="double">-1</factor>
281 <wrap type="bool">false</wrap>
286 <!-- Middle button and Ctrl pressed: move the view forward and backward -->
292 <property>/devices/status/mice/mouse[0]/button[0]</property>
294 <property>/devices/status/mice/mouse[0]/button[1]</property>
297 <command>property-adjust</command>
298 <property>/sim/current-view/z-offset-m</property>
299 <factor type="double">1</factor>
300 <wrap type="bool">false</wrap>
306 <!-- Mode 3: spring-loaded-view mode -->
308 <cursor>left-right</cursor>
309 <constrained type="bool">true</constrained>
310 <pass-through type="bool">false</pass-through>
312 <!-- extra buttons control FoV -->
313 <!-- these are often assigned to mouse-wheel motion in Linux -->
317 <property>/devices/status/mice/mouse[0]/button[2]</property>
319 <command>nasal</command>
320 <script>view.decrease()</script>
327 <property>/devices/status/mice/mouse[0]/button[2]</property>
329 <command>nasal</command>
330 <script>view.increase()</script>
334 <!-- Mouse left/right motion -->
337 <!-- rotate the view left or right -->
341 <property>/devices/status/mice/mouse[0]/button[1]</property>
344 <command>property-adjust</command>
345 <property>/sim/current-view/heading-offset-deg</property>
346 <factor type="double">-360</factor>
347 <min type="double">0</min>
348 <max type="double">360</max>
349 <wrap type="bool">true</wrap>
352 <!-- Middle button pressed: move the view position left or right -->
355 <property>/devices/status/mice/mouse[0]/button[1]</property>
357 <command>property-adjust</command>
358 <property>/sim/current-view/x-offset-m</property>
359 <factor type="double">1</factor>
360 <wrap type="bool">false</wrap>
365 <!-- Mouse up/down motion -->
368 <!-- tilt the view up and down -->
372 <property>/devices/status/mice/mouse[0]/button[1]</property>
375 <command>property-adjust</command>
376 <property>/sim/current-view/pitch-offset-deg</property>
377 <factor type="double">-180</factor>
378 <min type="double">-90</min>
379 <max type="double">90</max>
380 <wrap type="bool">false</wrap>
383 <!-- Middle button pressed move the view up and down -->
386 <property>/devices/status/mice/mouse[0]/button[1]</property>
388 <command>property-adjust</command>
389 <property>/sim/current-view/y-offset-m</property>
390 <factor type="double">-1</factor>
391 <wrap type="bool">false</wrap>
397 <!-- Middle button and Ctrl pressed: move the view forward and backward -->
400 <property>/devices/status/mice/mouse[0]/button[1]</property>
402 <command>property-adjust</command>
403 <property>/sim/current-view/z-offset-m</property>
404 <factor type="double">1</factor>
405 <wrap type="bool">false</wrap>
410 <not><property>/devices/status/mice/mouse[0]/button[1]</property></not>
412 <command>property-adjust</command>
413 <property>/sim/current-view/y-offset-m</property>
414 <factor type="double">-1</factor>
415 <wrap type="bool">false</wrap>
421 <command>property-adjust</command>
422 <property>/sim/current-view/x-offset-m</property>
423 <factor type="double">1</factor>
424 <wrap type="bool">false</wrap>
430 </mouse> <!-- of mouse 0 -->