-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmice.xml
439 lines (382 loc) · 11.5 KB
/
mice.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
<?xml version="1.0"?>
<!--
Mouse binding definitions.
This is a independent configuration file: it is not part of the main
FlightGear property tree.
Currently, Glut supports only one mouse, but the configuration format
is designed to support additional mice in the future if possible. The
current mode for each mouse is held in the
/devices/status/mice/mouse[n]/mode property.
-->
<PropertyList>
<mouse n="0">
<mode-count type="int">4</mode-count>
<mode archive="y" type="int">0</mode>
<mode n="0">
<cursor>inherit</cursor>
<constrained type="bool">false</constrained>
<pass-through type="bool">true</pass-through>
<button n="0">
<binding>
<condition>
<property>/sim/menubar/autovisibility/enabled</property>
</condition>
<command>property-assign</command>
<property>/sim/menubar/visibility</property>
<value type="bool">false</value>
</binding>
</button>
<button n="2">
<binding>
<command>cycle-mouse-mode</command>
<reason>right-click</reason>
</binding>
</button>
<!-- extra buttons control FoV -->
<!-- these are often assigned to mouse-wheel motion in Linux -->
<button n="3">
<binding>
<condition>
<and>
<property>/devices/status/mice/mouse[0]/button[2]</property>
<not><property>/sim/mouse/right-button-mode-cycle-enabled</property></not>
</and>
</condition>
<command>nasal</command>
<script>view.decrease()</script>
</binding>
</button>
<button n="4">
<binding>
<condition>
<and>
<property>/devices/status/mice/mouse[0]/button[2]</property>
<not><property>/sim/mouse/right-button-mode-cycle-enabled</property></not>
</and>
</condition>
<command>nasal</command>
<script>view.increase()</script>
</binding>
</button>
</mode>
<mode n="1">
<cursor>crosshair</cursor>
<constrained type="bool">true</constrained>
<pass-through type="bool">false</pass-through>
<button n="2">
<binding>
<command>cycle-mouse-mode</command>
<reason>right-click</reason>
</binding>
</button>
<!-- extra buttons control elevator trim -->
<!-- these are often assigned to mouse-wheel motion in Linux -->
<button n="3">
<binding>
<command>property-adjust</command>
<property>/controls/flight/elevator-trim</property>
<step type="double">0.01</step>
</binding>
</button>
<button n="4">
<binding>
<command>property-adjust</command>
<property>/controls/flight/elevator-trim</property>
<step type="double">-0.01</step>
</binding>
</button>
<!-- Mouse left/right motion. -->
<x-axis>
<!-- No buttons pressed: control ailerons -->
<binding>
<condition>
<and>
<not>
<property>/devices/status/mice/mouse[0]/button[0]</property>
</not>
<not>
<property>/devices/status/mice/mouse[0]/button[1]</property>
</not>
</and>
</condition>
<command>property-adjust</command>
<property>/controls/flight/aileron</property>
<factor type="double">4.0</factor>
<min type="double">-1.0</min>
<max type="double">1.0</max>
<wrap type="bool">false</wrap>
</binding>
<!-- Left button pressed: control rudder -->
<binding>
<condition>
<and>
<property>/devices/status/mice/mouse[0]/button[0]</property>
<not>
<property>/devices/status/mice/mouse[0]/button[1]</property>
</not>
</and>
</condition>
<command>property-adjust</command>
<property>/controls/flight/rudder</property>
<factor type="double">4.0</factor>
<min type="double">-1.0</min>
<max type="double">1.0</max>
<wrap type="bool">false</wrap>
</binding>
</x-axis>
<!-- Mouse up/down motion -->
<y-axis>
<!-- No buttons pressed: control elevator -->
<binding>
<condition>
<and>
<not>
<property>/devices/status/mice/mouse[0]/button[0]</property>
</not>
<not>
<property>/devices/status/mice/mouse[0]/button[1]</property>
</not>
</and>
</condition>
<command>property-adjust</command>
<property>/controls/flight/elevator</property>
<factor type="double">-4.0</factor>
<min type="double">-1.0</min>
<max type="double">1.0</max>
<wrap type="bool">false</wrap>
</binding>
<!-- Middle button pressed: control throttle -->
<binding>
<command>nasal</command>
<script>controls.throttleMouse()</script>
</binding>
</y-axis>
</mode>
<!-- Mode 2: view mode -->
<mode n="2">
<cursor>left-right</cursor>
<constrained type="bool">true</constrained>
<pass-through type="bool">false</pass-through>
<!-- left button centres view direction; middle + left also resets view point -->
<button n="0">
<binding>
<command>nasal</command>
<script>
view.resetViewDir();
view.resetFOV();
</script>
</binding>
<binding>
<condition>
<property>/devices/status/mice/mouse[0]/button[1]</property>
</condition>
<command>nasal</command>
<script>
view.resetViewPos();
</script>
</binding>
</button>
<!-- right button switches modes -->
<button n="2">
<binding>
<command>cycle-mouse-mode</command>
<reason>right-click</reason>
</binding>
</button>
<!-- extra buttons control FoV -->
<!-- these are often assigned to mouse-wheel motion in Linux -->
<button n="3">
<binding>
<command>nasal</command>
<script>view.decrease()</script>
</binding>
</button>
<button n="4">
<binding>
<command>nasal</command>
<script>view.increase()</script>
</binding>
</button>
<!-- Mouse left/right motion -->
<x-axis>
<!-- No buttons pressed: rotate the view left or right -->
<binding>
<condition>
<and>
<not>
<property>/devices/status/mice/mouse[0]/button[0]</property>
</not>
<not>
<property>/devices/status/mice/mouse[0]/button[1]</property>
</not>
</and>
</condition>
<command>property-adjust</command>
<property>/sim/current-view/heading-offset-deg</property>
<factor type="double">-360</factor>
<min type="double">0</min>
<max type="double">360</max>
<wrap type="bool">true</wrap>
</binding>
<!-- Middle button pressed: move the view position left or right -->
<binding>
<condition>
<and>
<not>
<property>/devices/status/mice/mouse[0]/button[0]</property>
</not>
<property>/devices/status/mice/mouse[0]/button[1]</property>
</and>
</condition>
<command>property-adjust</command>
<property>/sim/current-view/x-offset-m</property>
<factor type="double">1</factor>
<wrap type="bool">false</wrap>
</binding>
</x-axis>
<!-- Mouse up/down motion -->
<y-axis>
<!-- No buttons pressed: tilt the view up and down -->
<binding>
<condition>
<and>
<not>
<property>/devices/status/mice/mouse[0]/button[0]</property>
</not>
<not>
<property>/devices/status/mice/mouse[0]/button[1]</property>
</not>
</and>
</condition>
<command>property-adjust</command>
<property>/sim/current-view/pitch-offset-deg</property>
<factor type="double">-180</factor>
<min type="double">-90</min>
<max type="double">90</max>
<wrap type="bool">false</wrap>
</binding>
<!-- Middle button pressed move the view up and down -->
<binding>
<condition>
<and>
<not>
<property>/devices/status/mice/mouse[0]/button[0]</property>
</not>
<property>/devices/status/mice/mouse[0]/button[1]</property>
</and>
</condition>
<command>property-adjust</command>
<property>/sim/current-view/y-offset-m</property>
<factor type="double">-1</factor>
<wrap type="bool">false</wrap>
</binding>
</y-axis>
<!-- Middle button and Ctrl pressed: move the view forward and backward -->
<y-axis-ctrl>
<binding>
<condition>
<and>
<not>
<property>/devices/status/mice/mouse[0]/button[0]</property>
</not>
<property>/devices/status/mice/mouse[0]/button[1]</property>
</and>
</condition>
<command>property-adjust</command>
<property>/sim/current-view/z-offset-m</property>
<factor type="double">1</factor>
<wrap type="bool">false</wrap>
</binding>
</y-axis-ctrl>
</mode>
<!-- Mode 3: spring-loaded-view mode -->
<mode n="3">
<cursor>left-right</cursor>
<constrained type="bool">true</constrained>
<pass-through type="bool">false</pass-through>
<!-- Mouse left/right motion -->
<x-axis>
<!-- rotate the view left or right -->
<binding>
<condition>
<not>
<property>/devices/status/mice/mouse[0]/button[1]</property>
</not>
</condition>
<command>property-adjust</command>
<property>/sim/current-view/heading-offset-deg</property>
<factor type="double">-360</factor>
<min type="double">0</min>
<max type="double">360</max>
<wrap type="bool">true</wrap>
</binding>
<!-- Middle button pressed: move the view position left or right -->
<binding>
<condition>
<property>/devices/status/mice/mouse[0]/button[1]</property>
</condition>
<command>property-adjust</command>
<property>/sim/current-view/x-offset-m</property>
<factor type="double">1</factor>
<wrap type="bool">false</wrap>
</binding>
</x-axis>
<!-- Mouse up/down motion -->
<y-axis>
<!-- tilt the view up and down -->
<binding>
<condition>
<not>
<property>/devices/status/mice/mouse[0]/button[1]</property>
</not>
</condition>
<command>property-adjust</command>
<property>/sim/current-view/pitch-offset-deg</property>
<factor type="double">-180</factor>
<min type="double">-90</min>
<max type="double">90</max>
<wrap type="bool">false</wrap>
</binding>
<!-- Middle button pressed move the view up and down -->
<binding>
<condition>
<property>/devices/status/mice/mouse[0]/button[1]</property>
</condition>
<command>property-adjust</command>
<property>/sim/current-view/y-offset-m</property>
<factor type="double">-1</factor>
<wrap type="bool">false</wrap>
</binding>
</y-axis>
<y-axis-ctrl>
<!-- Middle button and Ctrl pressed: move the view forward and backward -->
<binding>
<condition>
<property>/devices/status/mice/mouse[0]/button[1]</property>
</condition>
<command>property-adjust</command>
<property>/sim/current-view/z-offset-m</property>
<factor type="double">1</factor>
<wrap type="bool">false</wrap>
</binding>
<binding>
<condition>
<not><property>/devices/status/mice/mouse[0]/button[1]</property></not>
</condition>
<command>property-adjust</command>
<property>/sim/current-view/y-offset-m</property>
<factor type="double">-1</factor>
<wrap type="bool">false</wrap>
</binding>
</y-axis-ctrl>
<x-axis-ctrl>
<binding>
<command>property-adjust</command>
<property>/sim/current-view/x-offset-m</property>
<factor type="double">1</factor>
<wrap type="bool">false</wrap>
</binding>
</x-axis-ctrl>
</mode>
</mouse> <!-- of mouse 0 -->
</PropertyList>