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>
38 <cursor>crosshair</cursor>
39 <constrained type="bool">true</constrained>
40 <pass-through type="bool">false</pass-through>
44 <command>property-assign</command>
45 <property>/devices/status/mice/mouse[0]/mode</property>
46 <value type="int">2</value>
50 <!-- extra buttons control elevator trim -->
51 <!-- these are often assigned to mouse-wheel motion in Linux -->
54 <command>property-adjust</command>
55 <property>/controls/flight/elevator-trim</property>
56 <step type="double">0.01</step>
62 <command>property-adjust</command>
63 <property>/controls/flight/elevator-trim</property>
64 <step type="double">-0.01</step>
68 <!-- Mouse left/right motion. -->
71 <!-- No buttons pressed: control ailerons -->
76 <property>/devices/status/mice/mouse[0]/button[0]</property>
79 <property>/devices/status/mice/mouse[0]/button[1]</property>
83 <command>property-adjust</command>
84 <property>/controls/flight/aileron</property>
85 <factor type="double">4.0</factor>
86 <min type="double">-1.0</min>
87 <max type="double">1.0</max>
88 <wrap type="bool">false</wrap>
91 <!-- Left button pressed: control rudder -->
95 <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/rudder</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>
111 <!-- Mouse up/down motion -->
114 <!-- No buttons pressed: control elevator -->
119 <property>/devices/status/mice/mouse[0]/button[0]</property>
122 <property>/devices/status/mice/mouse[0]/button[1]</property>
126 <command>property-adjust</command>
127 <property>/controls/flight/elevator</property>
128 <factor type="double">-4.0</factor>
129 <min type="double">-1.0</min>
130 <max type="double">1.0</max>
131 <wrap type="bool">false</wrap>
134 <!-- Middle button pressed: control throttle -->
136 <command>nasal</command>
137 <script>controls.throttleMouse()</script>
143 <!-- Mode 2: view mode -->
145 <cursor>left-right</cursor>
146 <constrained type="bool">true</constrained>
147 <pass-through type="bool">false</pass-through>
149 <!-- left button centres view direction; middle + left also resets view point -->
152 <command>nasal</command>
160 <property>/devices/status/mice/mouse[0]/button[1]</property>
162 <command>nasal</command>
169 <!-- right button switches modes -->
172 <command>property-assign</command>
173 <property>/devices/status/mice/mouse[0]/mode</property>
174 <value type="int">0</value>
178 <!-- extra buttons control FoV -->
179 <!-- these are often assigned to mouse-wheel motion in Linux -->
182 <command>nasal</command>
183 <script>view.decrease()</script>
189 <command>nasal</command>
190 <script>view.increase()</script>
194 <!-- Mouse left/right motion -->
197 <!-- No buttons pressed: rotate the view left or right -->
202 <property>/devices/status/mice/mouse[0]/button[0]</property>
205 <property>/devices/status/mice/mouse[0]/button[1]</property>
209 <command>property-adjust</command>
210 <property>/sim/current-view/heading-offset-deg</property>
211 <factor type="double">-360</factor>
212 <min type="double">0</min>
213 <max type="double">360</max>
214 <wrap type="bool">true</wrap>
218 <!-- Middle button pressed: move the view position left or right -->
223 <property>/devices/status/mice/mouse[0]/button[0]</property>
225 <property>/devices/status/mice/mouse[0]/button[1]</property>
228 <command>property-adjust</command>
229 <property>/sim/current-view/x-offset-m</property>
230 <factor type="double">1</factor>
231 <wrap type="bool">false</wrap>
236 <!-- Mouse up/down motion -->
239 <!-- No buttons pressed: tilt the view up and down -->
244 <property>/devices/status/mice/mouse[0]/button[0]</property>
247 <property>/devices/status/mice/mouse[0]/button[1]</property>
251 <command>property-adjust</command>
252 <property>/sim/current-view/pitch-offset-deg</property>
253 <factor type="double">-180</factor>
254 <min type="double">-90</min>
255 <max type="double">90</max>
256 <wrap type="bool">false</wrap>
259 <!-- Middle button pressed, no Ctrl: move the view up and down -->
264 <property>/devices/status/mice/mouse[0]/button[0]</property>
266 <property>/devices/status/mice/mouse[0]/button[1]</property>
268 <property>/devices/status/keyboard/ctrl</property>
272 <command>property-adjust</command>
273 <property>/sim/current-view/y-offset-m</property>
274 <factor type="double">-1</factor>
275 <wrap type="bool">false</wrap>
278 <!-- Middle button and Ctrl pressed: move the view forward and backward -->
283 <property>/devices/status/mice/mouse[0]/button[0]</property>
285 <property>/devices/status/mice/mouse[0]/button[1]</property>
286 <property>/devices/status/keyboard/ctrl</property>
289 <command>property-adjust</command>
290 <property>/sim/current-view/z-offset-m</property>
291 <factor type="double">1</factor>
292 <wrap type="bool">false</wrap>