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>
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>property-assign</command>
41 <property>/devices/status/mice/mouse[0]/mode</property>
42 <value type="int">1</value>
49 <cursor>crosshair</cursor>
50 <constrained type="bool">true</constrained>
51 <pass-through type="bool">false</pass-through>
55 <command>property-assign</command>
56 <property>/devices/status/mice/mouse[0]/mode</property>
57 <value type="int">2</value>
61 <!-- extra buttons control elevator trim -->
62 <!-- these are often assigned to mouse-wheel motion in Linux -->
65 <command>property-adjust</command>
66 <property>/controls/flight/elevator-trim</property>
67 <step type="double">0.01</step>
73 <command>property-adjust</command>
74 <property>/controls/flight/elevator-trim</property>
75 <step type="double">-0.01</step>
79 <!-- Mouse left/right motion. -->
82 <!-- No buttons pressed: control ailerons -->
87 <property>/devices/status/mice/mouse[0]/button[0]</property>
90 <property>/devices/status/mice/mouse[0]/button[1]</property>
94 <command>property-adjust</command>
95 <property>/controls/flight/aileron</property>
96 <factor type="double">4.0</factor>
97 <min type="double">-1.0</min>
98 <max type="double">1.0</max>
99 <wrap type="bool">false</wrap>
102 <!-- Left button pressed: control rudder -->
106 <property>/devices/status/mice/mouse[0]/button[0]</property>
108 <property>/devices/status/mice/mouse[0]/button[1]</property>
112 <command>property-adjust</command>
113 <property>/controls/flight/rudder</property>
114 <factor type="double">4.0</factor>
115 <min type="double">-1.0</min>
116 <max type="double">1.0</max>
117 <wrap type="bool">false</wrap>
122 <!-- Mouse up/down motion -->
125 <!-- No buttons pressed: control elevator -->
130 <property>/devices/status/mice/mouse[0]/button[0]</property>
133 <property>/devices/status/mice/mouse[0]/button[1]</property>
137 <command>property-adjust</command>
138 <property>/controls/flight/elevator</property>
139 <factor type="double">-4.0</factor>
140 <min type="double">-1.0</min>
141 <max type="double">1.0</max>
142 <wrap type="bool">false</wrap>
145 <!-- Middle button pressed: control throttle -->
147 <command>nasal</command>
148 <script>controls.throttleMouse()</script>
154 <!-- Mode 2: view mode -->
156 <cursor>left-right</cursor>
157 <constrained type="bool">true</constrained>
158 <pass-through type="bool">false</pass-through>
160 <!-- left button centres view direction; middle + left also resets view point -->
163 <command>nasal</command>
171 <property>/devices/status/mice/mouse[0]/button[1]</property>
173 <command>nasal</command>
180 <!-- right button switches modes -->
183 <command>property-assign</command>
184 <property>/devices/status/mice/mouse[0]/mode</property>
185 <value type="int">0</value>
189 <!-- extra buttons control FoV -->
190 <!-- these are often assigned to mouse-wheel motion in Linux -->
193 <command>nasal</command>
194 <script>view.decrease()</script>
200 <command>nasal</command>
201 <script>view.increase()</script>
205 <!-- Mouse left/right motion -->
208 <!-- No buttons pressed: rotate the view left or right -->
213 <property>/devices/status/mice/mouse[0]/button[0]</property>
216 <property>/devices/status/mice/mouse[0]/button[1]</property>
220 <command>property-adjust</command>
221 <property>/sim/current-view/heading-offset-deg</property>
222 <factor type="double">-360</factor>
223 <min type="double">0</min>
224 <max type="double">360</max>
225 <wrap type="bool">true</wrap>
229 <!-- Middle button pressed: move the view position left or right -->
234 <property>/devices/status/mice/mouse[0]/button[0]</property>
236 <property>/devices/status/mice/mouse[0]/button[1]</property>
239 <command>property-adjust</command>
240 <property>/sim/current-view/x-offset-m</property>
241 <factor type="double">1</factor>
242 <wrap type="bool">false</wrap>
247 <!-- Mouse up/down motion -->
250 <!-- No buttons pressed: tilt the view up and down -->
255 <property>/devices/status/mice/mouse[0]/button[0]</property>
258 <property>/devices/status/mice/mouse[0]/button[1]</property>
262 <command>property-adjust</command>
263 <property>/sim/current-view/pitch-offset-deg</property>
264 <factor type="double">-180</factor>
265 <min type="double">-90</min>
266 <max type="double">90</max>
267 <wrap type="bool">false</wrap>
270 <!-- Middle button pressed, no Ctrl: move the view up and down -->
275 <property>/devices/status/mice/mouse[0]/button[0]</property>
277 <property>/devices/status/mice/mouse[0]/button[1]</property>
279 <property>/devices/status/keyboard/ctrl</property>
283 <command>property-adjust</command>
284 <property>/sim/current-view/y-offset-m</property>
285 <factor type="double">-1</factor>
286 <wrap type="bool">false</wrap>
289 <!-- Middle button and Ctrl pressed: move the view forward and backward -->
294 <property>/devices/status/mice/mouse[0]/button[0]</property>
296 <property>/devices/status/mice/mouse[0]/button[1]</property>
297 <property>/devices/status/keyboard/ctrl</property>
300 <command>property-adjust</command>
301 <property>/sim/current-view/z-offset-m</property>
302 <factor type="double">1</factor>
303 <wrap type="bool">false</wrap>