remove README.Protocol and add a README that refers to the "real"
[fg:toms-fgdata.git] / keyboard.xml
1 <?xml version="1.0"?>
2 <!--
3 Key binding definitions.
4
5 The *-key in fg/osg/osgviewer is handled in the C++ code.
6
7 Regular keycodes go up to 255; special keys start at 256, and can be
8 calculated by adding 256 to the GLUT key value in glut.h.
9
10 All Nasal code in this file lives in a common Nasal namespace __kbd.
11 All <nasal> blocks on the top level are executed in the order from
12 top down before the key bindings are parsed.
13 -->
14
15 <PropertyList>
16  <nasal>
17   <script>
18       var shift = props.globals.getNode("/devices/status/keyboard/shift");
19       var ctrl = props.globals.getNode("/devices/status/keyboard/ctrl");
20       var alt = props.globals.getNode("/devices/status/keyboard/alt");
21
22       var get_modifiers = func {
23           shift.getValue() + 2 * ctrl.getValue() + 4 * alt.getValue();
24       }
25
26       var space_release = func {}
27       var space = func(state, mod) {
28           if (!state) {
29               space_release();
30               return space_release = func {};
31           }
32           if (mod == 0 or mod == 1) {
33               controls.ptt(mod + 1);
34               space_release = func { controls.ptt(0) }
35           } else {
36               gui.property_browser();
37           }
38       }
39   </script>
40  </nasal>
41
42  <key n="1">
43   <name>Ctrl-A</name>
44   <desc>Toggle autopilot altitude lock.</desc>
45   <binding>
46    <command>nasal</command>
47    <script>
48      node = props.globals.getNode("/autopilot/locks/altitude", 1);
49      if ( node.getValue() == "altitude-hold" ) {
50        node.setValue( "" );
51      } else {
52        node.setValue( "altitude-hold" );
53      }
54    </script>
55   </binding>
56  </key>
57
58  <key n="2">
59   <name>Ctrl-B</name>
60   <desc>Toggle speedbrake.</desc>
61   <binding>
62    <command>property-toggle</command>
63    <property>/controls/flight/speedbrake</property>
64   </binding>
65  </key>
66
67  <key n="3">
68   <name>Ctrl-C</name>
69   <desc>Toggle clickable panel hotspots</desc>
70   <binding>
71    <command>property-toggle</command>
72    <property>/sim/panel-hotspots</property>
73   </binding>
74  </key>
75
76  <key n="7">
77   <name>Ctrl-G</name>
78   <desc>Toggle autopilot glide slope lock.</desc>
79   <binding>
80    <command>nasal</command>
81    <script>
82      node = props.globals.getNode("/autopilot/locks/altitude", 1);
83      if ( node.getValue() == "gs1-hold" ) {
84        node.setValue( "" );
85      } else {
86        node.setValue( "gs1-hold" );
87      }
88    </script>
89   </binding>
90  </key>
91
92  <key n="8">
93   <name>Ctrl-H</name>
94   <desc>Toggle autopilot heading lock.</desc>
95   <binding>
96    <command>nasal</command>
97    <script>
98      node = props.globals.getNode("/autopilot/locks/heading", 1);
99      if ( node.getValue() == "dg-heading-hold" ) {
100        node.setValue( "" );
101      } else {
102        node.setValue( "dg-heading-hold" );
103      }
104    </script>
105   </binding>
106  </key>
107
108  <key n="9">
109   <name>Ctrl-I</name>
110   <desc>Show instrument setting dialog.</desc>
111   <binding>
112    <command>dialog-show</command>
113    <dialog-name>instruments</dialog-name>
114   </binding>
115  </key>
116
117  <key n="13">
118   <name>Enter</name>
119   <desc>Move rudder right.</desc>
120   <repeatable type="bool">true</repeatable>
121   <binding>
122    <command>property-adjust</command>
123    <property>/controls/flight/rudder</property>
124    <step type="double">0.05</step>
125   </binding>
126  </key>
127
128  <key n="14">
129   <name>Ctrl-N</name>
130   <desc>Toggle autopilot nav1 lock.</desc>
131   <binding>
132    <command>nasal</command>
133    <script>
134      node = props.globals.getNode("/autopilot/locks/heading", 1);
135      if ( node.getValue() == "nav1-hold" ) {
136        node.setValue( "" );
137      } else {
138        node.setValue( "nav1-hold" );
139      }
140    </script>
141   </binding>
142  </key>
143
144  <key n="16">
145   <name>Ctrl-P</name>
146   <desc>Toggle pitch hold.</desc>
147   <binding>
148    <command>nasal</command>
149    <script>
150      node = props.globals.getNode("/autopilot/locks/altitude", 1);
151      if ( node.getValue() == "pitch-hold" ) {
152        node.setValue( "" );
153      } else {
154        node.setValue( "pitch-hold" );
155        pitch = props.globals.getNode("/autopilot/settings/target-pitch-deg", 1);
156        pitch.setValue( getprop("/orientation/pitch-deg") );
157      }
158    </script>
159   </binding>
160  </key>
161
162  <key n="18">
163   <name>Ctrl-R</name>
164   <desc>Show radio setting dialog.</desc>
165   <binding>
166    <command>dialog-show</command>
167    <dialog-name>radios</dialog-name>
168   </binding>
169  </key>
170
171  <key n="19">
172   <name>Ctrl-S</name>
173   <desc>Toggle auto-throttle lock.</desc>
174   <binding>
175    <command>nasal</command>
176    <script>
177      node = props.globals.getNode("/autopilot/locks/speed", 1);
178      if ( node.getValue() == "speed-with-throttle" ) {
179        node.setValue( "" );
180      } else {
181        node.setValue( "speed-with-throttle" );
182      }
183    </script>
184   </binding>
185  </key>
186
187  <key n="20">
188   <name>Ctrl-T</name>
189   <desc>Toggle autopilot terrain lock.</desc>
190   <binding>
191    <command>nasal</command>
192    <script>
193      node = props.globals.getNode("/autopilot/locks/altitude", 1);
194      if ( node.getValue() == "agl-hold" ) {
195        node.setValue( "" );
196      } else {
197        node.setValue( "agl-hold" );
198        agl = props.globals.getNode("/autopilot/settings/target-agl-ft", 1);
199        agl.setValue( getprop("/position/altitude-agl-ft") );
200      }
201    </script>
202   </binding>
203  </key>
204
205  <key n="21">
206   <name>Ctrl-U</name>
207   <desc>[Cheat] Add 1000ft of emergency altitude.</desc>
208   <binding>
209    <command>property-adjust</command>
210    <property>/position/altitude-ft</property>
211    <step type="double">1000.0</step>
212   </binding>
213   <binding>
214    <command>property-assign</command>
215    <property>/sim/startup/onground</property>
216    <value type="bool">false</value>
217   </binding>
218  </key>
219
220  <key n="22">
221   <name>Ctrl-V</name>
222   <desc>Select initial view (view 0).</desc>
223   <binding>
224    <command>property-assign</command>
225    <property>/sim/current-view/view-number</property>
226    <value>0</value>
227   </binding>
228  </key>
229
230  <key n="23">
231   <name>Ctrl-W</name>
232   <desc>Toggle autopilot wing leveler.</desc>
233   <binding>
234    <command>nasal</command>
235    <script>
236      node = props.globals.getNode("/autopilot/locks/heading", 1);
237      if ( node.getValue() == "wing-leveler" ) {
238        node.setValue( "" );
239      } else {
240        node.setValue( "wing-leveler" );
241      }
242    </script>
243   </binding>
244  </key>
245
246  <key n="24">
247   <name>Ctrl-X</name>
248   <desc>Reset zoom to default.</desc>
249   <binding>
250    <command>property-assign</command>
251    <property>/sim/current-view/field-of-view</property>
252    <property>/sim/view/config/default-field-of-view-deg</property>
253   </binding>
254  </key>
255
256  <key n="27">
257   <name>ESC</name>
258   <desc>Prompt and quit FlightGear.</desc>
259   <binding>
260     <command>dialog-show</command>
261     <dialog-name>exit</dialog-name>
262   </binding>
263   <mod-shift>
264    <desc>Reset FlightGear.</desc>
265    <binding>
266     <command>old-reinit-dialog</command>
267    </binding>
268   </mod-shift>
269  </key>
270
271  <key n="32">
272   <name>SPACE</name>
273   <desc>PTT - Push To Talk (via VoIP)</desc>
274   <binding>
275    <command>nasal</command>
276    <script>space(1, get_modifiers())</script>
277   </binding>
278   <mod-up>
279    <binding>
280     <command>nasal</command>
281     <script>space(0, get_modifiers())</script>
282    </binding>
283   </mod-up>
284   <mod-shift>
285    <binding>
286     <command>nasal</command>
287     <script>space(1, get_modifiers())</script>
288    </binding>
289    <mod-up>
290     <binding>
291      <command>nasal</command>
292      <script>space(0, get_modifiers())</script>
293     </binding>
294    </mod-up>
295   </mod-shift>
296  </key>
297
298  <key n="33">
299   <name>!</name>
300   <desc>Select first engine</desc>
301   <binding>
302    <command>nasal</command>
303    <script>controls.selectEngine(0)</script>
304   </binding>
305  </key>
306
307  <key n="35">
308   <name>#</name>
309   <desc>Select third engine</desc>
310   <binding>
311    <command>nasal</command>
312    <script>controls.selectEngine(2)</script>
313   </binding>
314  </key>
315
316  <key n="36">
317   <name>$</name>
318   <desc>Select fourth engine</desc>
319   <binding>
320    <command>nasal</command>
321    <script>controls.selectEngine(3)</script>
322   </binding>
323  </key>
324
325  <key n="39">
326   <name>'</name>
327   <desc>Display a dialog relevant to the tuned in ATC service (if any)</desc>
328   <binding>
329     <command>ATC-dialog</command>
330   </binding>
331  </key>
332
333  <key n="43">
334   <name>+</name>
335   <desc>Let ATC/instructor repeat last message.</desc>
336   <binding>
337     <command>nasal</command>
338     <script>screen.msg_repeat()</script>
339   </binding>
340  </key>
341
342  <key n="44">
343   <name>,</name>
344   <desc>Left brake</desc>
345   <binding>
346    <command>nasal</command>
347    <script>controls.applyBrakes(1, -1)</script>
348   </binding>
349   <mod-up>
350    <binding>
351     <command>nasal</command>
352     <script>controls.applyBrakes(0, -1)</script>
353    </binding>
354   </mod-up>
355  </key>
356
357  <key n="46">
358   <name>.</name>
359   <desc>Right brake</desc>
360   <binding>
361    <command>nasal</command>
362    <script>controls.applyBrakes(1, 1)</script>
363   </binding>
364   <mod-up>
365    <binding>
366     <command>nasal</command>
367     <script>controls.applyBrakes(0, 1)</script>
368    </binding>
369   </mod-up>
370  </key>
371
372  <key n="48">
373   <name>0</name>
374   <desc>Move rudder left.</desc>
375   <repeatable type="bool">true</repeatable>
376   <binding>
377    <command>property-adjust</command>
378    <property>/controls/flight/rudder</property>
379    <step type="double">-0.05</step>
380   </binding>
381  </key>
382
383  <key n="49">
384   <name>1</name>
385   <desc>Decrease elevator trim.</desc>
386   <repeatable type="bool">true</repeatable>
387   <binding>
388    <command>property-adjust</command>
389    <property>/controls/flight/elevator-trim</property>
390    <step type="double">-0.001</step>
391   </binding>
392   <mod-shift>
393     <desc>Look back left</desc>
394     <binding>
395      <command>property-assign</command>
396      <property>/sim/current-view/goal-heading-offset-deg</property>
397      <property>/sim/view/config/back-left-direction-deg</property>
398     </binding>
399   </mod-shift>
400  </key>
401
402  <key n="50">
403   <name>2</name>
404   <desc>Increase elevator or autopilot altitude.</desc>
405   <repeatable type="bool">true</repeatable>
406   <binding>
407    <command>nasal</command>
408    <script>
409      controls.incElevator(-0.05, 100)
410    </script>
411   </binding>
412   <mod-shift>
413    <desc>Look back.</desc>
414    <binding>
415     <command>property-assign</command>
416     <property>/sim/current-view/goal-heading-offset-deg</property>
417     <property>/sim/view/config/back-direction-deg</property>
418    </binding>
419   </mod-shift>
420  </key>
421
422  <key n="51">
423   <name>3</name>
424   <desc>Decrease throttle or autopilot autothrottle.</desc>
425   <repeatable type="bool">true</repeatable>
426   <binding>
427    <command>nasal</command>
428    <script>
429      controls.incThrottle(-0.01, -1.0)
430    </script>
431   </binding>
432   <mod-shift>
433    <desc>Look back right.</desc>
434    <binding>
435     <command>property-assign</command>
436     <property>/sim/current-view/goal-heading-offset-deg</property>
437     <property>/sim/view/config/back-right-direction-deg</property>
438    </binding>
439   </mod-shift>
440  </key>
441
442  <key n="52">
443   <name>4</name>
444   <desc>Move aileron left (or adjust AP heading.)</desc>
445   <repeatable type="bool">true</repeatable>
446   <binding>
447    <command>nasal</command>
448    <script>
449      controls.incAileron(-0.05, -1.0)
450    </script>
451   </binding>
452   <mod-shift>
453    <desc>Look left.</desc>
454    <binding>
455     <command>property-assign</command>
456     <property>/sim/current-view/goal-heading-offset-deg</property>
457     <property>/sim/view/config/left-direction-deg</property>
458    </binding>
459   </mod-shift>
460  </key>
461
462  <key n="53">
463   <name>5</name>
464   <desc>Center aileron, elevator, and rudder.</desc>
465   <binding>
466    <command>nasal</command>
467    <script>controls.centerFlightControls()</script>
468   </binding>
469  </key>
470
471  <key n="54">
472   <name>6</name>
473   <desc>Move aileron right (or adjust AP heading.)</desc>
474   <repeatable type="bool">true</repeatable>
475   <binding>
476    <command>nasal</command>
477    <script>
478      controls.incAileron(0.05, 1.0)
479    </script>
480   </binding>
481   <mod-shift>
482    <desc>Look right.</desc>
483    <binding>
484     <command>property-assign</command>
485     <property>/sim/current-view/goal-heading-offset-deg</property>
486     <property>/sim/view/config/right-direction-deg</property>
487    </binding>
488   </mod-shift>
489  </key>
490
491  <key n="55">
492   <name>7</name>
493   <desc>Increase elevator trim.</desc>
494   <repeatable type="bool">true</repeatable>
495   <binding>
496    <command>property-adjust</command>
497    <property>/controls/flight/elevator-trim</property>
498    <step type="double">0.001</step>
499   </binding>
500   <mod-shift>
501    <desc>Look front left.</desc>
502    <binding>
503     <command>property-assign</command>
504     <property>/sim/current-view/goal-heading-offset-deg</property>
505     <property>/sim/view/config/front-left-direction-deg</property>
506    </binding>
507   </mod-shift>
508  </key>
509
510  <key n="56">
511   <name>8</name>
512   <desc>Decrease elevator or autopilot altitude.</desc>
513   <repeatable type="bool">true</repeatable>
514   <binding>
515    <command>nasal</command>
516    <script>
517      controls.incElevator(0.05, -100)
518    </script>
519   </binding>
520   <mod-shift>
521    <desc>Look forward.</desc>
522    <binding>
523     <command>property-assign</command>
524     <property>/sim/current-view/goal-heading-offset-deg</property>
525     <property>/sim/view/config/front-direction-deg</property>
526    </binding>
527   </mod-shift>
528  </key>
529
530  <key n="57">
531   <name>9</name>
532   <desc>Increase throttle or autopilot autothrottle.</desc>
533   <repeatable type="bool">true</repeatable>
534   <binding>
535   <command>nasal</command>
536    <script>
537      controls.incThrottle(0.01, 1.0)
538    </script>
539   </binding>
540   <mod-shift>
541    <desc>Look front right.</desc>
542    <binding>
543     <command>property-assign</command>
544     <property>/sim/current-view/goal-heading-offset-deg</property>
545     <property>/sim/view/config/front-right-direction-deg</property>
546    </binding>
547   </mod-shift>
548  </key>
549
550  <key n="63">
551   <name>?</name>
552   <desc>Show help dialog</desc>
553   <binding>
554    <command>nasal</command>
555    <script>gui.showHelpDialog("/sim/help", 1)</script>
556   </binding>
557  </key>
558
559  <key n="64">
560   <name>@</name>
561   <desc>Select second engine</desc>
562   <binding>
563    <command>nasal</command>
564    <script>controls.selectEngine(1)</script>
565   </binding>
566  </key>
567
568  <key n="65">
569   <name>A</name>
570   <desc>Decrease speed-up.</desc>
571   <binding>
572    <command>property-adjust</command>
573    <property>/sim/speed-up</property>
574    <min>1</min>
575    <step type="double">-1</step>
576   </binding>
577  </key>
578
579  <key n="66">
580   <name>B</name>
581   <desc>Toggle parking brake on or off</desc>
582   <binding>
583    <command>nasal</command>
584    <script>controls.applyParkingBrake(1)</script>
585   </binding>
586   <mod-up>
587    <binding>
588     <command>nasal</command>
589     <script>controls.applyParkingBrake(0)</script>
590    </binding>
591   </mod-up>
592  </key>
593
594  <key n="71">
595   <name>G</name>
596   <desc>Gear down.</desc>
597   <binding>
598    <command>nasal</command>
599    <script>controls.gearDown(1)</script>
600   </binding>
601   <mod-up>
602    <binding>
603     <command>nasal</command>
604     <script>controls.gearDown(0)</script>
605    </binding>
606   </mod-up>
607  </key>
608
609  <key n="72">
610   <name>H</name>
611   <desc>Cycle HUD Brightness</desc>
612   <binding>
613    <command>nasal</command>
614    <script>aircraft.HUD.cycle_brightness()</script>
615   </binding>
616  </key>
617
618  <key n="73">
619   <name>I</name>
620   <desc>Switch to and toggle alternative HUD types</desc>
621   <binding>
622    <command>nasal</command>
623    <script>aircraft.HUD.cycle_type()</script>
624   </binding>
625  </key>
626
627  <key n="77">
628   <name>M</name>
629   <desc>Mixture leaner.</desc>
630   <repeatable type="bool">true</repeatable>
631   <binding>
632    <command>nasal</command>
633    <script>controls.adjMixture(-1)</script>
634   </binding>
635  </key>
636
637  <key n="78">
638   <name>N</name>
639   <desc>Propeller Coarser.</desc>
640   <repeatable type="bool">true</repeatable>
641   <binding>
642    <command>nasal</command>
643    <script>controls.adjPropeller(-1)</script>
644   </binding>
645  </key>
646
647  <key n="80">
648   <name>P</name>
649   <desc>Toggle panel.</desc>
650   <binding>
651    <command>property-toggle</command>
652    <property>/sim/panel/visibility</property>
653   </binding>
654  </key>
655
656  <key n="83">
657   <name>S</name>
658   <desc>Swap panels.</desc>
659   <binding>
660    <condition>
661      <not>
662      <property>/sim/allow-toggle-cockpit</property>
663      </not>
664    </condition>
665    <command>property-swap</command>
666    <property>/sim/panel/path</property>
667    <property>/sim/panel_2/path</property>
668   </binding>
669   <binding>
670    <condition>
671      <not>
672      <property>/sim/allow-toggle-cockpit</property>
673      </not>
674    </condition>
675    <command>panel-load</command>
676   </binding>
677  </key>
678
679  <key n="84">
680   <name>T</name>
681   <desc>Decrease warp delta.</desc>
682   <binding>
683    <command>property-adjust</command>
684    <property>/sim/time/warp-delta</property>
685    <step type="int">-30</step>
686   </binding>
687  </key>
688
689  <key n="86">
690   <name>V</name>
691   <desc>Scroll in reverse through views.</desc>
692   <binding>
693    <command>nasal</command>
694    <script>view.stepView(-1)</script>
695   </binding>
696  </key>
697
698  <key n="87">
699   <name>W</name>
700   <desc>Decrease warp.</desc>
701   <binding>
702    <command>property-adjust</command>
703    <property>/sim/time/warp</property>
704    <step type="int">-60</step>
705   </binding>
706  </key>
707
708  <key n="88">
709   <name>X</name>
710   <desc>Increase field of view.</desc>
711   <repeatable type="bool">true</repeatable>
712   <binding>
713    <command>nasal</command>
714    <script>view.increase()</script>
715   </binding>
716  </key>
717
718  <key n="90">
719   <name>Z</name>
720   <desc>Decrease Visibility</desc>
721   <repeatable type="bool">true</repeatable>
722   <binding>
723    <command>decrease-visibility</command>
724   </binding>
725  </key>
726
727  <key n="91">
728   <name>[</name>
729   <desc>Decrease flaps.</desc>
730   <binding>
731    <command>nasal</command>
732    <script>controls.flapsDown(-1)</script>
733   </binding>
734   <mod-up>
735    <binding>
736     <command>nasal</command>
737     <script>controls.flapsDown(0)</script>
738    </binding>
739   </mod-up>
740  </key>
741
742  <key n="93">
743   <name>]</name>
744   <desc>Increase flaps.</desc>
745   <binding>
746    <command>nasal</command>
747    <script>controls.flapsDown(1)</script>
748   </binding>
749   <mod-up>
750    <binding>
751     <command>nasal</command>
752     <script>controls.flapsDown(0)</script>
753    </binding>
754   </mod-up>
755  </key>
756
757  <key n="97">
758   <name>a</name>
759   <desc>Increase speed-up.</desc>
760   <binding>
761    <command>property-adjust</command>
762    <property>/sim/speed-up</property>
763    <min>1</min>
764    <step type="double">1</step>
765   </binding>
766  </key>
767
768  <key n="98">
769   <name>b</name>
770   <desc>Apply all brakes.</desc>
771   <binding>
772    <command>nasal</command>
773    <script>controls.applyBrakes(1)</script>
774   </binding>
775   <mod-up>
776    <binding>
777     <command>nasal</command>
778     <script>controls.applyBrakes(0)</script>
779    </binding>
780   </mod-up>
781  </key>
782
783  <key n="99">
784   <name>c</name>
785   <desc>Toggle 3D/2D cockpit</desc>
786   <binding>
787    <command>nasal</command>
788    <script>
789     if(getprop("/sim/allow-toggle-cockpit")) {
790         setprop("/sim/current-view/internal", !getprop("/sim/current-view/internal"));
791         setprop("/sim/view/internal", getprop("/sim/current-view/internal"));
792         setprop("/sim/virtual-cockpit", !getprop("/sim/virtual-cockpit"));
793         if(getprop("/sim/current-view/internal")) {
794           setprop("/sim/current-view/heading-offset-deg", getprop("/sim/current-view/config/heading-offset-deg"));
795           setprop("/sim/current-view/pitch-offset-deg", getprop("/sim/current-view/config/pitch-offset-deg"));
796         } else {
797           setprop("/sim/current-view/heading-offset-deg", 0);
798           setprop("/sim/current-view/pitch-offset-deg", 0);
799         }
800     }
801    </script>
802   </binding>
803  </key>
804
805  <key n="103">
806   <name>g</name>
807   <desc>Gear Up.</desc>
808   <binding>
809    <command>nasal</command>
810    <script>controls.gearDown(-1)</script>
811   </binding>
812   <mod-up>
813    <binding>
814     <command>nasal</command>
815     <script>controls.gearDown(0)</script>
816    </binding>
817   </mod-up>
818  </key>
819
820  <key n="104">
821   <name>h</name>
822   <desc>HUD Master Switch</desc>
823   <binding>
824    <command>nasal</command>
825    <script>aircraft.HUD.cycle_color()</script>
826   </binding>
827  </key>
828
829  <key n="105">
830   <name>i</name>
831   <desc>Normal HUD</desc>
832   <binding>
833    <command>nasal</command>
834    <script>aircraft.HUD.normal_type()</script>
835   </binding>
836  </key>
837
838  <key n="106">
839   <name>j</name>
840   <desc>Decrease spoilers.</desc>
841   <binding>
842    <command>nasal</command>
843    <script>controls.stepSpoilers(-1)</script>
844   </binding>
845  </key>
846
847  <key n="107">
848   <name>k</name>
849   <desc>Increase spoilers.</desc>
850   <binding>
851    <command>nasal</command>
852    <script>controls.stepSpoilers(1)</script>
853   </binding>
854  </key>
855
856  <key n="108">
857   <name>l</name>
858   <desc>Toggle tail-wheel lock.</desc>
859   <binding>
860    <command>property-toggle</command>
861    <property>/controls/gear/tailwheel-lock</property>
862   </binding>
863  </key>
864
865  <key n="109">
866   <name>m</name>
867   <desc>Mixture richer.</desc>
868   <repeatable type="bool">true</repeatable>
869   <binding>
870    <command>nasal</command>
871    <script>controls.adjMixture(1)</script>
872   </binding>
873  </key>
874
875  <key n="110">
876   <name>n</name>
877   <desc>Propeller Finer.</desc>
878   <repeatable type="bool">true</repeatable>
879   <binding>
880    <command>nasal</command>
881    <script>controls.adjPropeller(1)</script>
882   </binding>
883  </key>
884
885  <key n="112">
886   <name>p</name>
887   <desc>Toggle the pause state of the sim.</desc>
888   <binding>
889    <command>property-toggle</command>
890    <property>/sim/freeze/master</property>
891   </binding>
892   <binding>
893    <command>property-toggle</command>
894    <property>/sim/freeze/clock</property>
895   </binding>
896   <binding>
897    <condition>
898      <property>/sim/freeze/replay-state</property>
899    </condition>
900    <command>property-assign</command>
901    <property>/sim/freeze/replay-state</property>
902    <value type="int">0</value>
903   </binding>
904  </key>
905
906  <key n="114">
907   <name>r</name>
908   <desc>Activate the instant replay system.</desc>
909   <binding>
910    <command>replay</command>
911   </binding>
912  </key>
913
914  <key n="115">
915   <name>s</name>
916   <desc>Fire Starter on Selected Engine(s)</desc>
917   <binding>
918    <command>nasal</command>
919    <script>controls.startEngine()</script>
920   </binding>
921   <mod-up>
922    <binding>
923     <command>nasal</command>
924     <script>props.setAll("/controls/engines/engine", "starter", 0)</script>
925    </binding>
926   </mod-up>
927  </key>
928
929  <nasal>
930   <script>
931     var t_id = 0;
932   </script>
933  </nasal>
934
935  <key n="116">
936   <name>t</name>
937   <desc>Increase warp delta.</desc>
938   <binding>
939    <command>property-adjust</command>
940    <property>/sim/time/warp-delta</property>
941    <step type="int">30</step>
942   </binding>
943   <binding>
944    <command>nasal</command>
945    <script>
946     (func(x) {
947         settimer(func {
948             x == t_id or return;
949             gui.popupTip("resetting warp");
950             setprop("/sim/time/warp-delta", 0);
951         }, 1, 1)
952     })(t_id += 1)
953    </script>
954   </binding>
955   <mod-up>
956    <binding>
957     <command>nasal</command>
958     <script>t_id += 1</script>
959    </binding>
960   </mod-up>
961  </key>
962
963  <key n="118">
964   <name>v</name>
965   <desc>Scroll through views.</desc>
966   <binding>
967    <command>nasal</command>
968    <script>view.stepView(1)</script>
969   </binding>
970  </key>
971
972  <key n="119">
973   <name>w</name>
974   <desc>Increase warp.</desc>
975   <binding>
976    <command>property-adjust</command>
977    <property>/sim/time/warp</property>
978    <step type="int">60</step>
979   </binding>
980  </key>
981
982  <key n="120">
983   <name>x</name>
984   <desc>Decrease field of view.</desc>
985   <repeatable type="bool">true</repeatable>
986   <binding>
987    <command>nasal</command>
988    <script>view.decrease()</script>
989   </binding>
990  </key>
991
992  <key n="122">
993   <name>z</name>
994   <desc>Increase Visibility</desc>
995   <repeatable type="bool">true</repeatable>
996   <binding>
997    <command>increase-visibility</command>
998   </binding>
999  </key>
1000
1001  <key n="123">
1002   <name>{</name>
1003   <desc>Decrease Magneto on Selected Engine</desc>
1004   <binding>
1005    <command>nasal</command>
1006    <script>controls.stepMagnetos(-1)</script>
1007   </binding>
1008  </key>
1009
1010  <key n="125">
1011   <name>}</name>
1012   <desc>Increase Magneto on Selected Engine</desc>
1013   <binding>
1014    <command>nasal</command>
1015    <script>controls.stepMagnetos(1)</script>
1016   </binding>
1017  </key>
1018
1019  <key n="126">
1020   <name>~</name>
1021   <desc>Select all engines</desc>
1022   <binding>
1023    <command>nasal</command>
1024    <script>controls.selectAllEngines()</script>
1025   </binding>
1026  </key>
1027
1028  <key n="257">
1029   <name>F1</name>
1030   <mod-shift>
1031    <desc>Load flight.</desc>
1032    <binding>
1033     <command>load</command>
1034    </binding>
1035   </mod-shift>
1036  </key>
1037
1038  <key n="258">
1039   <name>F2</name>
1040   <desc>Force tile cache reload.</desc>
1041   <binding>
1042    <command>tile-cache-reload</command>
1043   </binding>
1044   <mod-shift>
1045    <desc>Save flight.</desc>
1046    <binding>
1047     <command>save</command>
1048     <write-all>false</write-all>
1049    </binding>
1050   </mod-shift>
1051  </key>
1052
1053  <key n="259">
1054   <name>F3</name>
1055   <desc>Capture screen.</desc>
1056   <binding>
1057    <command>nasal</command>
1058    <script>
1059      fgcommand("screen-capture");
1060      var file = getprop("/sim/last-screenshot");
1061      if(file == "")
1062          gui.popupTip("Error writing screenshot");
1063      else
1064          gui.popupTip("Screenshot written to " ~ file);
1065    </script>
1066   </binding>
1067   <mod-shift>
1068    <desc>Load panel.</desc>
1069    <binding>
1070     <command>panel-load</command>
1071    </binding>
1072   </mod-shift>
1073  </key>
1074
1075  <key n="260">
1076   <name>F4</name>
1077   <desc>Force lighting update.</desc>
1078   <binding>
1079    <command>lighting-update</command>
1080   </binding>
1081   <mod-shift>
1082    <desc>Reload global preferences.</desc>
1083    <binding>
1084     <command>preferences-load</command>
1085    </binding>
1086   </mod-shift>
1087  </key>
1088
1089  <key n="261">
1090   <name>F5</name>
1091   <repeatable type="bool">true</repeatable>
1092   <mod-shift>
1093    <desc>Scroll panel down</desc>
1094    <binding>
1095     <command>property-adjust</command>
1096     <property>/sim/panel/y-offset</property>
1097     <step type="int">-5</step>
1098    </binding>
1099   </mod-shift>
1100  </key>
1101
1102  <key n="262">
1103   <name>F6</name>
1104   <desc>Toggle Autopilot Heading Mode</desc>
1105   <repeatable type="bool">true</repeatable>
1106   <binding>
1107    <command>nasal</command>
1108    <script>
1109     prop = "/autopilot/locks/heading";
1110     curr = getprop(prop);
1111     if(curr == "true-heading-hold") { setprop(prop, ""); }
1112     else { setprop(prop, "true-heading-hold"); }
1113    </script>
1114   </binding>
1115   <mod-shift>
1116    <desc>Scroll panel up</desc>
1117    <binding>
1118     <command>property-adjust</command>
1119     <property>/sim/panel/y-offset</property>
1120     <step type="int">5</step>
1121    </binding>
1122   </mod-shift>
1123  </key>
1124
1125  <key n="263">
1126   <name>F7</name>
1127   <repeatable type="bool">true</repeatable>
1128   <mod-shift>
1129    <desc>Scroll panel left</desc>
1130    <binding>
1131     <command>property-adjust</command>
1132     <property>/sim/panel/x-offset</property>
1133     <step type="int">-5</step>
1134    </binding>
1135   </mod-shift>
1136  </key>
1137
1138  <key n="264">
1139   <name>F8</name>
1140   <desc>Cycle fog type</desc>
1141   <repeatable type="bool">true</repeatable>
1142   <binding>
1143    <command>property-cycle</command>
1144    <property>/sim/rendering/fog</property>
1145    <value>fastest</value>
1146    <value>nicest</value>
1147    <value>disabled</value>
1148   </binding>
1149   <mod-shift>
1150    <desc>Scroll panel right</desc>
1151    <binding>
1152     <command>property-adjust</command>
1153     <property>/sim/panel/x-offset</property>
1154     <step type="int">5</step>
1155    </binding>
1156   </mod-shift>
1157  </key>
1158
1159  <key n="265">
1160   <name>F9</name>
1161   <desc>Toggle textures.</desc>
1162   <binding>
1163    <command>property-toggle</command>
1164    <property>/sim/rendering/textures</property>
1165   </binding>
1166   <mod-shift>
1167    <desc>Toggle FDM data logging.</desc>
1168    <binding>
1169     <command>property-toggle</command>
1170     <property>/sim/temp/fdm-data-logging</property>
1171    </binding>
1172   </mod-shift>
1173  </key>
1174
1175  <key n="266">
1176   <name>F10</name>
1177   <desc>Toggle menubar</desc>
1178   <binding>
1179    <command>property-toggle</command>
1180    <property>/sim/menubar/visibility</property>
1181   </binding>
1182   <mod-shift>
1183    <desc>Switch to next GUI style.</desc>
1184    <binding>
1185     <command>nasal</command>
1186     <script>gui.nextStyle()</script>
1187    </binding>
1188   </mod-shift>
1189  </key>
1190
1191  <key n="267">
1192   <name>F11</name>
1193   <desc>Pop up autopilot dialog</desc>
1194   <binding>
1195    <command>dialog-show</command>
1196    <dialog-name>autopilot</dialog-name>
1197   </binding>
1198  </key>
1199
1200  <key n="269">
1201   <name>Enter</name>
1202   <desc>Move rudder right.</desc>
1203   <repeatable type="bool">true</repeatable>
1204   <binding>
1205    <command>property-adjust</command>
1206    <property>/controls/flight/rudder</property>
1207    <step type="double">0.05</step>
1208   </binding>
1209  </key>
1210
1211  <key n="309">
1212   <name>Keypad 5</name>
1213   <desc>Center aileron, elevator, and rudder.</desc>
1214   <binding>
1215    <command>nasal</command>
1216    <script>controls.centerFlightControls()</script>
1217   </binding>
1218  </key>
1219
1220  <key n="356">
1221   <name>Left</name>
1222   <desc>Move aileron left (or adjust AP heading.)</desc>
1223   <repeatable type="bool">true</repeatable>
1224   <binding>
1225    <command>nasal</command>
1226    <script>
1227      controls.incAileron(-0.05, -1.0)
1228    </script>
1229   </binding>
1230   <mod-shift>
1231    <desc>Look left.</desc>
1232    <binding>
1233     <command>property-assign</command>
1234     <property>/sim/current-view/goal-heading-offset-deg</property>
1235     <property>/sim/view/config/left-direction-deg</property>
1236    </binding>
1237   </mod-shift>
1238  </key>
1239
1240  <key n="357">
1241   <name>Up</name>
1242   <desc>Increase elevator or autopilot altitude.</desc>
1243   <repeatable type="bool">true</repeatable>
1244   <binding>
1245    <command>nasal</command>
1246    <script>
1247      controls.incElevator(0.05, -100)
1248    </script>
1249   </binding>
1250   <mod-shift>
1251    <desc>Look forward.</desc>
1252    <binding>
1253     <command>property-assign</command>
1254     <property>/sim/current-view/goal-heading-offset-deg</property>
1255     <property>/sim/view/config/front-direction-deg</property>
1256    </binding>
1257   </mod-shift>
1258  </key>
1259
1260  <key n="358">
1261   <name>Right</name>
1262   <desc>Move aileron right (or adjust AP heading.)</desc>
1263   <repeatable type="bool">true</repeatable>
1264   <binding>
1265    <command>nasal</command>
1266    <script>
1267      controls.incAileron(0.05, 1.0)
1268    </script>
1269    <step type="double">0.05</step>
1270   </binding>
1271   <mod-shift>
1272    <desc>Look right.</desc>
1273    <binding>
1274     <command>property-assign</command>
1275     <property>/sim/current-view/goal-heading-offset-deg</property>
1276     <property>/sim/view/config/right-direction-deg</property>
1277    </binding>
1278   </mod-shift>
1279  </key>
1280
1281  <key n="359">
1282   <name>Down</name>
1283   <desc>Decrease elevator or autopilot altitude.</desc>
1284   <repeatable type="bool">true</repeatable>
1285   <binding>
1286    <command>nasal</command>
1287    <script>
1288      controls.incElevator(-0.05, 100)
1289    </script>
1290   </binding>
1291   <mod-shift>
1292    <desc>Look backwards.</desc>
1293    <binding>
1294     <command>property-assign</command>
1295     <property>/sim/current-view/goal-heading-offset-deg</property>
1296     <property>/sim/view/config/back-direction-deg</property>
1297    </binding>
1298   </mod-shift>
1299  </key>
1300
1301  <key n="360">
1302   <name>PageUp</name>
1303   <desc>Increase throttle or autopilot autothrottle.</desc>
1304   <repeatable type="bool">true</repeatable>
1305   <binding>
1306    <command>nasal</command>
1307    <script>
1308      controls.incThrottle(0.01, 1.0)
1309    </script>
1310   </binding>
1311   <mod-shift>
1312    <desc>Look front right.</desc>
1313    <binding>
1314     <command>property-assign</command>
1315     <property>/sim/current-view/goal-heading-offset-deg</property>
1316     <property>/sim/view/config/front-right-direction-deg</property>
1317    </binding>
1318   </mod-shift>
1319  </key>
1320
1321  <key n="361">
1322   <name>PageDown</name>
1323   <desc>Decrease throttle or autopilot autothrottle.</desc>
1324   <repeatable type="bool">true</repeatable>
1325   <binding>
1326    <command>nasal</command>
1327    <script>
1328      controls.incThrottle(-0.01, -1.0)
1329    </script>
1330   </binding>
1331   <mod-shift>
1332    <desc>Look back right.</desc>
1333    <binding>
1334     <command>property-assign</command>
1335     <property>/sim/current-view/goal-heading-offset-deg</property>
1336     <property>/sim/view/config/back-right-direction-deg</property>
1337    </binding>
1338   </mod-shift>
1339  </key>
1340
1341  <key n="362">
1342   <name>Home</name>
1343   <desc>Increase elevator trim.</desc>
1344   <repeatable type="bool">true</repeatable>
1345   <binding>
1346    <command>property-adjust</command>
1347    <property>/controls/flight/elevator-trim</property>
1348    <step type="double">0.001</step>
1349   </binding>
1350   <mod-shift>
1351    <desc>Look front left.</desc>
1352    <binding>
1353     <command>property-assign</command>
1354     <property>/sim/current-view/goal-heading-offset-deg</property>
1355     <property>/sim/view/config/front-left-direction-deg</property>
1356    </binding>
1357   </mod-shift>
1358  </key>
1359
1360  <key n="363">
1361   <name>End</name>
1362   <desc>Decrease elevator trim.</desc>
1363   <repeatable type="bool">true</repeatable>
1364   <binding>
1365    <command>property-adjust</command>
1366    <property>/controls/flight/elevator-trim</property>
1367    <step type="double">-0.001</step>
1368   </binding>
1369   <mod-shift>
1370    <desc>Look back left.</desc>
1371    <binding>
1372     <command>property-assign</command>
1373     <property>/sim/current-view/goal-heading-offset-deg</property>
1374     <property>/sim/view/config/back-left-direction-deg</property>
1375    </binding>
1376   </mod-shift>
1377  </key>
1378
1379  <key n="364">
1380   <name>Insert</name>
1381   <desc>Move rudder left.</desc>
1382   <repeatable type="bool">true</repeatable>
1383   <binding>
1384    <command>property-adjust</command>
1385    <property>/controls/flight/rudder</property>
1386    <step type="double">-0.05</step>
1387   </binding>
1388  </key>
1389
1390 </PropertyList>
1391
1392 <!-- end of keyboard.xml -->