File: mice.xml

package info (click to toggle)
fgfs-base 1.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 453,252 kB
  • ctags: 111
  • sloc: xml: 575,865; makefile: 46; sh: 7
file content (322 lines) | stat: -rw-r--r-- 8,543 bytes parent folder | download | duplicates (2)
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
<?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">3</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="2">
    <binding>
     <command>property-assign</command>
     <property>/devices/status/mice/mouse[0]/mode</property>
     <value type="int">1</value>
    </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.002</step>
    </binding>
   </button>

   <button n="4">
    <binding>
     <command>property-adjust</command>
     <property>/controls/flight/elevator-trim</property>
     <step type="double">-0.002</step>
    </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>property-assign</command>
     <property>/devices/status/mice/mouse[0]/mode</property>
     <value type="int">2</value>
    </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>property-assign</command>
     <property>/devices/status/mice/mouse[0]/mode</property>
     <value type="int">0</value>
    </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: 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, no Ctrl: 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>
       <not>
        <property>/devices/status/keyboard/ctrl</property>
       </not>
      </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>

    <!-- Middle button and Ctrl pressed: move the view forward and backward -->
    <binding>
     <condition>
      <and>
       <not>
        <property>/devices/status/mice/mouse[0]/button[0]</property>
       </not>
       <property>/devices/status/mice/mouse[0]/button[1]</property>
       <property>/devices/status/keyboard/ctrl</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>

  </mode>

 </mouse>

</PropertyList>