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 the offsets -->
170 <command>property-assign</command>
171 <property>/sim/current-view/heading-offset-deg</property>
172 <property>/sim/view/config/front-direction-deg</property>
175 <command>property-assign</command>
176 <property>/sim/current-view/goal-pitch-offset-deg</property>
177 <property>/sim/current-view/config/pitch-offset-deg</property>
181 <!-- right button switches modes -->
184 <command>property-assign</command>
185 <property>/devices/status/mice/mouse[0]/mode</property>
186 <value type="int">0</value>
190 <!-- extra buttons control elevator trim -->
191 <!-- these are often assigned to mouse-wheel motion in Linux -->
194 <command>property-adjust</command>
195 <property>/controls/flight/elevator-trim</property>
196 <step type="double">0.01</step>
202 <command>property-adjust</command>
203 <property>/controls/flight/elevator-trim</property>
204 <step type="double">-0.01</step>
208 <!-- Mouse left/right motion -->
211 <!-- No buttons pressed: rotate the view left or right -->
216 <property>/devices/status/mice/mouse[0]/button[0]</property>
219 <property>/devices/status/mice/mouse[0]/button[1]</property>
223 <command>property-adjust</command>
224 <property>/sim/current-view/heading-offset-deg</property>
225 <factor type="double">-360</factor>
226 <min type="double">0</min>
227 <max type="double">360</max>
228 <wrap type="bool">true</wrap>
232 <!-- Middle button pressed: move the view position left or right -->
237 <property>/devices/status/mice/mouse[0]/button[0]</property>
239 <property>/devices/status/mice/mouse[0]/button[1]</property>
242 <command>property-adjust</command>
243 <property>/sim/current-view/x-offset-m</property>
244 <factor type="double">1</factor>
245 <wrap type="bool">false</wrap>
250 <!-- Mouse up/down motion -->
253 <!-- No buttons pressed: tilt the view up and down -->
258 <property>/devices/status/mice/mouse[0]/button[0]</property>
261 <property>/devices/status/mice/mouse[0]/button[1]</property>
265 <command>property-adjust</command>
266 <property>/sim/current-view/pitch-offset-deg</property>
267 <factor type="double">-180</factor>
268 <min type="double">-90</min>
269 <max type="double">90</max>
270 <wrap type="bool">false</wrap>
273 <!-- Middle button pressed: move the view up and down -->
278 <property>/devices/status/mice/mouse[0]/button[0]</property>
280 <property>/devices/status/mice/mouse[0]/button[1]</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>