Debian Codegraph @

Input/Joysticks/Saitek/Cyborg-X.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--Joystick binding definitions for "Saitek Cyborg X" and "Saitek F.L.Y. 5" Joysticks.
3 This file was modified from the "Cyborg-Gold-3d-USB.xml" file that is distributed with FlightGear v2.60
4
5 Modified By Andy Wagner(e-Tron on FlightGear forum)
6
7
8
9
10 Axis # (direction) mapped to
11 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12 axis 0:(left-right) aileron
13 axis 1:(forward-backward) elevator
14 axis 2:(slider) throttle
15 axis 3:(twist) rudder
16
17
18
19
20
21 ~~~~ Modifiers ~~~~
22 button 9:(Button 10) "^" Modifier 1
23 button 10:(Button 11) "F3" Modifier 2
24 button 13:(Shift state) "F4" Modifier 3
25
26
27
28
29 Button #(location) No Mod Mod 1 Mod 2 Mod 3
30 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31 button 0:(trigger) Brakes Parking Brake SpeedBrake Thrust Reverse
32 button 1:(Button 2) Flaps Up Gear Up # #
33 button 2:(Button 3) Flaps Down Gear Down # #
34 button 3:(Button 4) Previous View Trim Rudder # #
35 button 4:(Button 5) Next View Trim Rudder # #
36 button 5:(Button 6) Reset View Reset All Trim Cockpit View Tail Wheel Lock
37 button 6:(Button 7) Pause # # #
38 button 7:(Button 8) # # # #
39 button 8:(Button 9) # # # #
40 button 11:(scroll wheel up) Zoom In # # #
41 button 12:(scroll wheel dwn) Zoom Out # # #
42
43 axis 5: (hat left-right) look l/r Trim Aileron Adj Mixture #
44 axis 6: (hat up-down) look u/d Trim Elevator Adj Propeller #
45
46 -->
47
48
49 <PropertyList>
50
51
52 <name>Saitek Cyborg X</name>
53 <name>Cyborg X</name>
54 <name>F.L.Y 5</name>
55 <name>FLY 5</name>
56 <name>FLY5</name>
57 <name>Mad Catz Mad Catz F.L.Y.5 Stick</name>
58 <name>Saitek FLY5</name>
59 <name>Saitek F.L.Y. 5</name>
60 <name>Saitek FLY 5</name>
61
62 <!-- ~~~~~~~~~~~~~~~~~~~~~~~~ Axis Bindings ~~~~~~~~~~~~~~~~~~~~~~~~ -->
63
64 <axis n="0">
65 <desc>Aileron</desc>
66 <binding>
67 <command>property-scale</command>
68 <property>/controls/flight/aileron</property>
69 <power type="double">2</power>
70 </binding>
71 </axis>
72
73 <axis n="1">
74 <desc>Elevator</desc>
75 <binding>
76 <command>property-scale</command>
77 <property>/controls/flight/elevator</property>
78 <factor type="double">-1.0</factor>
79 <power type="double">2</power>
80 </binding>
81 </axis>
82
83 <axis>
84 <number>
85 <mac>3</mac>
86 <unix>2</unix>
87 <windows>2</windows>
88 </number>
89 <desc>Throttle</desc>
90 <binding>
91 <command>nasal</command>
92 <script>controls.throttleAxis()</script>
93 </binding>
94 </axis>
95
96 <axis>
97 <number>
98 <mac>2</mac>
99 <unix>3</unix>
100 <windows>3</windows>
101 </number>
102 <desc>Rudder</desc>
103 <binding>
104 <command>property-scale</command>
105 <property>/controls/flight/rudder</property>
106 <power type="double">2</power>
107 </binding>
108 </axis>
109
110 <!-- ~~~~~~~~~~~~~~~~~~~~~~~~ Hat Switch ~~~~~~~~~~~~~~~~~~~~~~~~ -->
111 <axis>
112 <desc>View Direction; Aileron Trim;</desc>
113 <number>
114 <unix>5</unix>
115 <mac>5</mac>
116 <windows>5</windows>
117 </number>
118 <low>
119 <repeatable>true</repeatable>
120 <binding>
121 <command>nasal</command>
122 <script>
123 mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
124 if (mod == nil or mod == 0) {
125 v = getprop("/sim/current-view/view-number");
126 if (v == 0 or v == 4) {
127 view.panViewDir(2);
128 } else {
129 view.panViewDir(2);
130 }
131 } elsif (mod == 1) {
132 controls.aileronTrim(-0.75);
133 } elsif (mod == 2) {
134 controls.adjMixture(-2);
135 } elsif (mod == 3) {
136 #
137 }
138 </script>
139 </binding>
140 </low>
141 <high>
142 <repeatable>true</repeatable>
143 <binding>
144 <command>nasal</command>
145 <script>
146 mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
147 if (mod == nil or mod == 0) {
148 v = getprop("/sim/current-view/view-number");
149 if (v == 0 or v == 4) {
150 view.panViewDir(-2);
151 } else {
152 view.panViewDir(-2);
153 }
154 } elsif (mod == 1) {
155 controls.aileronTrim(0.75);
156 } elsif (mod == 2) {
157 controls.adjMixture(2);
158 } elsif (mod == 3) {
159 #
160 }
161 </script>
162 </binding>
163 </high>
164 </axis>
165
166 <axis>
167 <desc>View Elevation; Elevator Trim;</desc>
168 <number>
169 <unix>6</unix>
170 <mac>6</mac>
171 <windows>6</windows>
172 </number>
173 <low>
174 <repeatable>true</repeatable>
175 <binding>
176 <command>nasal</command>
177 <script>
178 mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
179 if (mod == nil or mod == 0) {
180 view.panViewPitch(2);
181 } elsif (mod == 1) {
182 controls.elevatorTrim(0.75);
183 } elsif (mod == 2) {
184 controls.adjPropeller(1);
185 } elsif (mod == 3) {
186 #
187 }
188 </script>
189 </binding>
190 </low>
191 <high>
192 <repeatable>true</repeatable>
193 <binding>
194 <command>nasal</command>
195 <script>
196 mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
197 if (mod == nil or mod == 0) {
198 view.panViewPitch(-2);
199 } elsif (mod == 1) {
200 controls.elevatorTrim(-0.75);
201 } elsif (mod == 2) {
202 controls.adjPropeller(-1);
203 } elsif (mod == 3) {
204 #
205 }
206 </script>
207 </binding>
208 </high>
209 </axis>
210
211
212 <!-- ~~~~~~~~~~~~~~~~~~~~~~~~ Button Bindings ~~~~~~~~~~~~~~~~~~~~~~~~ -->
213
214 <!-- Trigger Button - Brakes, Parking Brake, Thrust Reverser -->
215 <button n="0">
216 <desc>Brakes</desc>
217 <repeatable type="bool">true</repeatable>
218 <binding>
219 <command>nasal</command>
220 <script>
221 mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
222 if (mod == nil or mod == 0) {
223 interpolate("/controls/gear/brake-left", 1, 0.075);
224 interpolate("/controls/gear/brake-right", 1, 0.075);
225 } elsif (mod == 1) {
226 setprop("/controls/gear/brake-left", 1);
227 setprop("/controls/gear/brake-right", 1);
228 } elsif (mod == 2) {
229 #
230 } elsif (mod == 3) {
231 #
232 }
233 </script>
234 </binding>
235 <mod-up>
236 <repeatable type="bool">true</repeatable>
237 <binding>
238 <command>nasal</command>
239 <script>
240 mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
241 if (mod == nil or mod == 0) {
242 interpolate("/controls/gear/brake-left", 0, 0.075);
243 interpolate("/controls/gear/brake-right", 0, 0.075);
244 } elsif (mod == 1) {
245 brake = !getprop("/controls/gear/brake-parking");
246 setprop("/controls/gear/brake-parking", brake);
247 if (brake) {
248 gui.popupTip("Parking Brake ON");
249 } else {
250 gui.popupTip("Parking Brake OFF");
251 }
252 setprop("/controls/gear/brake-left", 0);
253 setprop("/controls/gear/brake-right", 0);
254 } elsif (mod == 2) {
255 speedbrake = !getprop("/controls/flight/speedbrake");
256 setprop("/controls/flight/speedbrake", speedbrake);
257 } elsif (mod == 3) {
258 reverser = !getprop("/controls/engines/engine[0]/reverser");
259 props.setAll("/controls/engines/engine", "reverser", reverser);
260 if (reverser) {
261 gui.popupTip("Thrust Reverser ON");
262 } else {
263 gui.popupTip("Thrust Reverser OFF");
264 }
265 }
266 </script>
267 </binding>
268 </mod-up>
269 </button>
270
271
272
273 <!-- Left Button below Hat-switch, labeled "2" -->
274 <button n="1">
275 <desc>Flaps Up; Gear up</desc>
276 <repeatable type="bool">false</repeatable>
277 <binding>
278 <command>nasal</command>
279 <script>
280 mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
281 if (mod == nil or mod == 0) {
282 controls.flapsDown(-1);
283 } elsif (mod == 1) {
284 controls.gearDown(-1);
285 } elsif (mod == 2) {
286 #
287 } elsif (mod == 3) {
288 #
289 }
290 </script>
291 </binding>
292 <mod-up>
293 <binding>
294 <command>nasal</command>
295 <script>
296 mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
297 if (mod == nil or mod == 0) {
298 controls.flapsDown(0);
299 } elsif (mod == 1) {
300 controls.gearDown(0);
301 } elsif (mod == 2) {
302 #
303 } elsif (mod == 3) {
304 #
305 }
306 </script>
307 </binding>
308 </mod-up>
309 </button>
310
311 <!-- Right Button below Hat-switch, labeled "3" -->
312 <button n="2">
313 <desc>Flaps Down; Gear down</desc>
314 <repeatable type="bool">false</repeatable>
315 <binding>
316 <command>nasal</command>
317 <script>
318 mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
319 if (mod == nil or mod == 0) {
320 controls.flapsDown(1);
321 } elsif (mod == 1) {
322 controls.gearDown(1);
323 } elsif (mod == 2) {
324 #
325 } elsif (mod == 3) {
326 #
327 }
328 </script>
329 </binding>
330 <mod-up>
331 <binding>
332 <command>nasal</command>
333 <script>
334 mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
335 if (mod == nil or mod == 0) {
336 controls.flapsDown(0);
337 } elsif (mod == 1) {
338 controls.gearDown(0);
339 } elsif (mod == 2) {
340 #
341 } elsif (mod == 3) {
342 #
343 }
344 </script>
345 </binding>
346 </mod-up>
347 </button>
348
349 <!-- Button left of Hat switch, Labeled '4' -->
350 <button n="3">
351 <desc>Previous View</desc>
352 <repeatable type="bool">false</repeatable>
353 <binding>
354 <command>nasal</command>
355 <script>
356 mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
357 if (mod == nil or mod == 0) {
358 view.stepView(-1);
359 } elsif (mod == 1) {
360 controls.rudderTrim(-0.75);
361 } elsif (mod == 2) {
362 #
363 } elsif (mod == 3) {
364 #
365 }
366 </script>
367 </binding>
368 </button>
369
370 <!-- Button right of hat switch, Labeled '5' -->
371 <button n="4">
372 <desc>Next View</desc>
373 <repeatable type="bool">false</repeatable>
374 <binding>
375 <command>nasal</command>
376 <script>
377 mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
378 if (mod == nil or mod == 0) {
379 view.stepView(1);
380 } elsif (mod == 1) {
381 controls.rudderTrim(0.75);
382 } elsif (mod == 2) {
383 #
384 } elsif (mod == 3) {
385 #
386 }
387 </script>
388 </binding>
389 </button>
390
391 <!-- Button labeled "6" -->
392 <button>
393 <desc>Reset view; toggle tail-wheel lock; reset trim</desc>
394 <number>
395 <unix>5</unix>
396 <mac>5</mac>
397 <windows>5</windows>
398 </number>
399 <repeatable type="bool">false</repeatable>
400 <binding>
401 <command>nasal</command>
402 <script>
403 mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
404 if (mod == nil or mod == 0) {
405 view.resetView();
406 } elsif (mod == 1) {
407 setprop("/controls/flight/elevator-trim", 0);
408 setprop("/controls/flight/aileron-trim", 0);
409 setprop("/controls/flight/rudder-trim", 0);
410 } elsif (mod == 2) {
411 setprop("/sim/current-view/view-number", 0);
412 view.resetView();
413 } elsif (mod == 3) {
414 twlock = !getprop("/controls/gear/tailwheel-lock");
415 setprop("/controls/gear/tailwheel-lock", twlock);
416 if (twlock) {
417 gui.popupTip("Tail Wheel LOCKED");
418 } else {
419 gui.popupTip("Tail Wheel UNLOCKED");
420 }
421 }
422 </script>
423 </binding>
424 </button>
425
426 <!-- Button labeled "7" -->
427 <button n="6">
428 <desc>Toggle the pause state of the sim</desc>
429 <number>
430 <unix>6</unix>
431 <mac>6</mac>
432 <windows>6</windows>
433 </number>
434 <binding>
435 <command>property-toggle</command>
436 <property>/sim/freeze/master</property>
437 </binding>
438 <binding>
439 <command>property-toggle</command>
440 <property>/sim/freeze/clock</property>
441 </binding>
442 <binding>
443 <condition>
444 <property>/sim/freeze/replay-state</property>
445 </condition>
446 <command>property-assign</command>
447 <property>/sim/freeze/replay-state</property>
448 <value type="int">0</value>
449 </binding>
450 </button>
451 <!-- Scroll wheel down -->
452 <button n="12">
453 <desc>Zoom View</desc>
454 <repeatable type="bool">false</repeatable>
455 <binding>
456 <command>nasal</command>
457 <script>
458 mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
459 if (mod == nil or mod == 0) {
460 view.increase();
461 } elsif (mod == 1) {
462 #
463 } elsif (mod == 2) {
464 #
465 } elsif (mod == 3) {
466 #
467 }
468 </script>
469 </binding>
470 </button>
471
472 <!-- Scroll wheel up -->
473 <button n="11">
474 <desc>Zoom View</desc>
475 <repeatable type="bool">false</repeatable>
476 <binding>
477 <command>nasal</command>
478 <script>
479 mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
480 if (mod == nil or mod == 0) {
481 view.decrease();
482 } elsif (mod == 1) {
483 #
484 } elsif (mod == 2) {
485 #
486 } elsif (mod == 3) {
487 #
488 }
489 </script>
490 </binding>
491 </button><!-- ~~~~~~~~~~~~~~~~~~~~~~~~ Modifier Buttons ~~~~~~~~~~~~~~~~~~~~~~~~ -->
492
493 <!-- Button labeled '10' -->
494 <button n="9">
495 <desc>Modifier 1</desc>
496 <repeatable type="bool">false</repeatable>
497 <binding>
498 <command>nasal</command>
499 <script>
500 name = "/input/joysticks/js[0]/saitek-cyborg-evo-modifier";
501 setprop(name, 1);
502 </script>
503 </binding>
504 <mod-up>
505 <binding>
506 <command>nasal</command>
507 <script>
508 name = "/input/joysticks/js[0]/saitek-cyborg-evo-modifier";
509 setprop(name, 0);
510 </script>
511 </binding>
512 </mod-up>
513 </button>
514
515 <!-- Button labeled '11' -->
516 <button n="10">
517 <desc>Modifier 2</desc>
518 <repeatable type="bool">false</repeatable>
519 <binding>
520 <command>nasal</command>
521 <script>
522 name = "/input/joysticks/js[0]/saitek-cyborg-evo-modifier";
523 setprop(name, 2);
524 </script>
525 </binding>
526 <mod-up>
527 <binding>
528 <command>nasal</command>
529 <script>
530 name = "/input/joysticks/js[0]/saitek-cyborg-evo-modifier";
531 setprop(name, 0);
532 </script>
533 </binding>
534 </mod-up>
535 </button>
536
537 <!-- Button labeled 0/O (Shift State Button) -->
538 <button n="13">
539 <desc>Modifier 3</desc>
540 <repeatable type="bool">false</repeatable>
541 <binding>
542 <command>nasal</command>
543 <script>
544 name = "/input/joysticks/js[0]/saitek-cyborg-evo-modifier";
545 setprop(name, 3);
546 </script>
547 </binding>
548 <mod-up>
549 <binding>
550 <command>nasal</command>
551 <script>
552 name = "/input/joysticks/js[0]/saitek-cyborg-evo-modifier";
553 setprop(name, 0);
554 </script>
555 </binding>
556 </mod-up>
557 </button>
558
559
560 </PropertyList>