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