2004-02-19 14:16:23 +00:00
|
|
|
<?xml version="1.0"?>
|
2002-09-07 11:10:04 +00:00
|
|
|
<!--
|
2004-02-19 14:16:23 +00:00
|
|
|
$Id$
|
2002-09-07 11:10:04 +00:00
|
|
|
|
2004-02-19 14:16:23 +00:00
|
|
|
|
|
|
|
_______________________________________ Layout _______________________________________
|
|
|
|
|
|
|
|
|
2005-06-22 13:08:01 +00:00
|
|
|
axis 0: aileron
|
|
|
|
axis 1: elevator
|
|
|
|
axis 2: rudder
|
|
|
|
axis 3: throttle
|
|
|
|
|
|
|
|
|
|
|
|
no modifier F3 F4 F3+F4
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
button 0 (trigger): brakes parking brake speed brake thrust revers.
|
|
|
|
button 1 (left): flaps up gear up previous view *
|
|
|
|
button 2 (middle): reset view dir tail wheel lock cockpit view reset all trim
|
|
|
|
button 3 (right): flaps down gear down next view *
|
|
|
|
button 4 (F1): brakes left * zoom out *
|
|
|
|
button 5 (F2): brakes right * zoom in *
|
|
|
|
button 6 (F3): //////////////////////// modifier 0 /////////////////////////
|
|
|
|
button 7 (F4): //////////////////////// modifier 1 /////////////////////////
|
|
|
|
button 8 (>>): * * * *
|
|
|
|
button 9 (<<): * * * *
|
|
|
|
hat left: look left leaner mixture aileron trim rudder trim
|
|
|
|
hat right: look right richer mixture aileron trim rudder trim
|
|
|
|
hat back: look down dec prop pitch elevator trim *
|
|
|
|
hat forward: look up inc prop pitch elevator trim *
|
2004-02-19 14:16:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
F3 and F4 are used like "Shift", "Control", or "Alternate" on computer keyboards.
|
|
|
|
For example: press F3 and keep holding it down while pressing the fire
|
|
|
|
button/trigger -> toggle parking brake
|
|
|
|
|
2004-04-06 16:47:57 +00:00
|
|
|
When flying the Harrier, "F3/hat left" and "right" control the thrust vector.
|
|
|
|
|
2004-02-19 14:16:23 +00:00
|
|
|
|
|
|
|
|
2006-06-24 18:18:01 +00:00
|
|
|
With the keyboard's Control key pressed, the following keys have a different meaning:
|
|
|
|
|
|
|
|
Control + no modifier
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
button 0 (trigger): trigger selected weapon
|
|
|
|
button 1 (left): switch to previous weapon system
|
2007-02-18 18:33:11 +00:00
|
|
|
button 3 (right): switch to next weapon system
|
2006-06-24 18:18:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2004-02-19 14:16:23 +00:00
|
|
|
___________________________________ Customization ____________________________________
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If you want to change some (or all) of the bindings, the recommended way is
|
|
|
|
to copy this file to your home directory, make your changes there, and include
|
2005-06-13 06:41:30 +00:00
|
|
|
it from your personal preferences.xml file. You can use any number lower than
|
|
|
|
1000 for n in <js-named n="0">. The lowest takes precedence in case of identical
|
|
|
|
names. You can include such a preferences.xml file with the ~~config option,
|
2005-07-01 05:20:24 +00:00
|
|
|
e.g. ~~config=$HOME/.fgfs/preferences.xml, and you can put that ~~config line
|
|
|
|
into your personal $HOME/.fgfsrc file.
|
2004-02-19 14:16:23 +00:00
|
|
|
|
2005-06-13 06:41:30 +00:00
|
|
|
<?xml version="1.0"?>
|
2004-02-19 14:16:23 +00:00
|
|
|
<PropertyList>
|
|
|
|
<input>
|
2005-06-13 06:41:30 +00:00
|
|
|
<js-named n="100">
|
|
|
|
<joysticks include="your-modified-copy.xml"/>
|
|
|
|
</js-named>
|
2004-02-19 14:16:23 +00:00
|
|
|
</input>
|
|
|
|
</PropertyList>
|
|
|
|
|
|
|
|
|
2005-06-22 13:08:01 +00:00
|
|
|
The property "/input/joysticks/js[0]/data/modifier" indicates the "shift" level.
|
|
|
|
F3 sets bit 0, F4 sets bit 1. The property is zero if none of the shift buttons
|
|
|
|
is pressed, 1 if F3 is pressed, 2 if F4 is pressed, and 3 if both F3 and F4 are
|
|
|
|
pressed.
|
2004-02-19 14:16:23 +00:00
|
|
|
|
|
|
|
Note that you have to enclose nasal scripts in <script><![CDATA[...]]></script>
|
|
|
|
if they contain characters that interfere with the xml markup. This is the case
|
2005-05-10 10:58:28 +00:00
|
|
|
if you are, for example, using < (lower than). Alternatively, you can 'escape'
|
2004-02-19 14:16:23 +00:00
|
|
|
the character with "<".
|
|
|
|
|
2005-07-01 05:20:24 +00:00
|
|
|
Also note that all nasal code shares a common namespace, so it's possible to set
|
2005-06-19 17:29:56 +00:00
|
|
|
a variable in one nasal binding, and to read it in another.
|
2004-02-19 14:16:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
____________________________________ References ______________________________________
|
|
|
|
|
|
|
|
|
|
|
|
|
2004-02-26 09:39:24 +00:00
|
|
|
Joysticks: $FG_ROOT/Docs/README.Joystick.html
|
|
|
|
Properties: see property browser (fgfs menu: "File"->"Browse internal properties")
|
2004-02-19 14:16:23 +00:00
|
|
|
|
|
|
|
Nasal: http://www.plausible.org/nasal/
|
|
|
|
Nasal examples: $FG_ROOT/Nasal/
|
|
|
|
|
|
|
|
|
|
|
|
______________________________________________________________________________________
|
|
|
|
|
2005-06-13 06:41:30 +00:00
|
|
|
~~ Melchior FRANZ <mfranz # aon : at>
|
2002-09-07 11:10:04 +00:00
|
|
|
-->
|
|
|
|
|
|
|
|
<PropertyList>
|
2004-02-19 14:16:23 +00:00
|
|
|
<name>SAITEK CYBORG 3D USB</name>
|
|
|
|
<name>CYBORG 3D USB</name>
|
2002-09-07 11:10:04 +00:00
|
|
|
|
2005-06-13 06:41:30 +00:00
|
|
|
<data>
|
|
|
|
<mode type="int">0</mode>
|
|
|
|
<modifier type="int">0</modifier>
|
|
|
|
</data>
|
|
|
|
|
|
|
|
<nasal>
|
2007-10-09 20:11:08 +00:00
|
|
|
<script>
|
2007-06-11 19:23:15 +00:00
|
|
|
var self = cmdarg().getParent();
|
|
|
|
var data = self.getNode("data");
|
|
|
|
var mode = data.getNode("mode");
|
|
|
|
var modifier = data.getNode("modifier");
|
|
|
|
var f1 = 0;
|
|
|
|
var f2 = 0;
|
|
|
|
var left_brake = 0;
|
|
|
|
var right_brake = 0;
|
|
|
|
var trigger = 0;
|
2006-06-24 18:18:01 +00:00
|
|
|
|
2006-10-12 13:55:15 +00:00
|
|
|
if (props.globals.getNode("/rotors", 0) != nil) {
|
2007-01-17 12:45:32 +00:00
|
|
|
self.getNode("axis[0]/binding/power").setIntValue(1);
|
|
|
|
self.getNode("axis[1]/binding/power").setIntValue(1);
|
2006-10-12 13:55:15 +00:00
|
|
|
}
|
|
|
|
|
2007-10-09 20:11:08 +00:00
|
|
|
var viewdir = props.globals.getNode("/sim").getChildren("view");
|
|
|
|
forindex (var i; viewdir) {
|
|
|
|
var t = viewdir[i].getNode("type");
|
2007-10-09 20:44:41 +00:00
|
|
|
viewdir[i] = t != nil and t.getValue() == "lookat" ? 1 : -1;
|
2007-10-09 20:11:08 +00:00
|
|
|
}
|
|
|
|
|
2007-06-11 19:23:15 +00:00
|
|
|
var kbdshift = props.globals.getNode("/devices/status/keyboard/shift", 1);
|
|
|
|
var kbdctrl = props.globals.getNode("/devices/status/keyboard/ctrl", 1);
|
|
|
|
var kbdalt = props.globals.getNode("/devices/status/keyboard/alt", 1);
|
2005-06-13 06:41:30 +00:00
|
|
|
|
2007-06-11 19:23:15 +00:00
|
|
|
var get_mode = func { modifier.getValue() + mode.getValue() * 4 }
|
2007-10-09 20:11:08 +00:00
|
|
|
var aircraft = getprop("/sim/aircraft");
|
2005-06-13 06:41:30 +00:00
|
|
|
|
2007-06-11 19:23:15 +00:00
|
|
|
var harrier = func {
|
2007-10-09 20:11:08 +00:00
|
|
|
if (aircraft == "harrier") {
|
2005-06-13 06:41:30 +00:00
|
|
|
thv = getprop("/controls/engines/engine[0]/mixture");
|
2007-02-18 18:33:11 +00:00
|
|
|
gui.popupTip("Thrust vector " ~ int(thv * 120 - 20 + 0.5));
|
2005-06-13 06:41:30 +00:00
|
|
|
}
|
|
|
|
}
|
2007-10-09 20:11:08 +00:00
|
|
|
</script>
|
2005-06-13 06:41:30 +00:00
|
|
|
</nasal>
|
|
|
|
|
2004-02-19 14:16:23 +00:00
|
|
|
<axis n="0">
|
2006-10-21 13:51:42 +00:00
|
|
|
<desc>aileron</desc>
|
2004-02-19 14:16:23 +00:00
|
|
|
<binding>
|
|
|
|
<command>property-scale</command>
|
|
|
|
<property>/controls/flight/aileron</property>
|
2007-01-17 12:42:13 +00:00
|
|
|
<power type="int">2</power>
|
2004-02-19 14:16:23 +00:00
|
|
|
</binding>
|
|
|
|
</axis>
|
2002-09-07 11:10:04 +00:00
|
|
|
|
2004-02-19 14:16:23 +00:00
|
|
|
<axis n="1">
|
2006-10-21 13:51:42 +00:00
|
|
|
<desc>elevator</desc>
|
2004-02-19 14:16:23 +00:00
|
|
|
<binding>
|
|
|
|
<command>property-scale</command>
|
|
|
|
<property>/controls/flight/elevator</property>
|
|
|
|
<factor type="double">-1.0</factor>
|
2007-01-17 12:42:13 +00:00
|
|
|
<power type="int">2</power>
|
2004-02-19 14:16:23 +00:00
|
|
|
</binding>
|
|
|
|
</axis>
|
|
|
|
|
2004-04-29 09:14:14 +00:00
|
|
|
<axis>
|
2006-10-21 13:51:42 +00:00
|
|
|
<desc>rudder</desc>
|
2004-04-29 09:14:14 +00:00
|
|
|
<number>
|
|
|
|
<unix>2</unix>
|
2005-02-11 15:30:45 +00:00
|
|
|
<mac>2</mac>
|
2004-04-29 09:14:14 +00:00
|
|
|
<windows>3</windows>
|
|
|
|
</number>
|
2004-02-19 14:16:23 +00:00
|
|
|
<binding>
|
|
|
|
<command>property-scale</command>
|
|
|
|
<property>/controls/flight/rudder</property>
|
|
|
|
<offset type="double">0.0</offset>
|
|
|
|
<factor type="double">1.0</factor>
|
2007-01-17 12:42:13 +00:00
|
|
|
<power type="int">2</power>
|
2004-02-19 14:16:23 +00:00
|
|
|
</binding>
|
|
|
|
</axis>
|
|
|
|
|
2004-04-29 09:14:14 +00:00
|
|
|
<axis>
|
2006-10-21 13:51:42 +00:00
|
|
|
<desc>throttle</desc>
|
2004-04-29 09:14:14 +00:00
|
|
|
<number>
|
|
|
|
<unix>3</unix>
|
2005-02-11 15:30:45 +00:00
|
|
|
<mac>2</mac>
|
2004-04-29 09:14:14 +00:00
|
|
|
<windows>2</windows>
|
|
|
|
</number>
|
2004-02-19 14:16:23 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>controls.throttleAxis()</script>
|
|
|
|
</binding>
|
|
|
|
</axis>
|
|
|
|
|
2006-10-21 10:21:45 +00:00
|
|
|
<button n="0">
|
|
|
|
<name>Trigger</name>
|
2006-10-21 13:51:42 +00:00
|
|
|
<desc>brakes, +Ctrl: fire, +F3: parking brake, +F4: speedbrake, +F3+F4: thrust reverser</desc>
|
2006-03-01 18:55:48 +00:00
|
|
|
<repeatable type="bool">false</repeatable>
|
2004-02-19 14:16:23 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
2005-06-19 18:25:57 +00:00
|
|
|
m = get_mode();
|
|
|
|
if (m == 0) {
|
2006-06-24 18:18:01 +00:00
|
|
|
if (kbdctrl.getBoolValue()) {
|
|
|
|
controls.trigger(trigger = 1);
|
|
|
|
} else {
|
|
|
|
controls.applyBrakes(1);
|
|
|
|
}
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 1) {
|
2006-03-01 18:42:37 +00:00
|
|
|
controls.applyBrakes(1);
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 2) {
|
2004-02-19 14:16:23 +00:00
|
|
|
#
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 3) {
|
2004-02-19 14:16:23 +00:00
|
|
|
#
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
2005-06-19 18:25:57 +00:00
|
|
|
m = get_mode();
|
|
|
|
if (m == 0) {
|
2006-06-24 18:18:01 +00:00
|
|
|
if (trigger) {
|
|
|
|
controls.trigger(trigger = 0);
|
|
|
|
} else {
|
|
|
|
controls.applyBrakes(0);
|
|
|
|
}
|
2006-03-01 18:42:37 +00:00
|
|
|
controls.applyBrakes(0);
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 1) {
|
2006-03-01 18:42:37 +00:00
|
|
|
i = controls.applyParkingBrake(1);
|
2007-02-18 18:33:11 +00:00
|
|
|
gui.popupTip("Parking Brake " ~ (i ? "ON" : "OFF"));
|
2006-03-01 18:42:37 +00:00
|
|
|
controls.applyBrakes(0);
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 2) {
|
2005-06-13 06:41:30 +00:00
|
|
|
i = !getprop("/controls/flight/speedbrake");
|
|
|
|
setprop("/controls/flight/speedbrake", i);
|
2007-02-18 18:33:11 +00:00
|
|
|
gui.popupTip("Speed Brake " ~ (i ? "ON" : "OFF"));
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 3) {
|
2005-06-13 06:41:30 +00:00
|
|
|
i = !getprop("/controls/engines/engine[0]/reverser");
|
|
|
|
props.setAll("/controls/engines/engine", "reverser", i);
|
2007-02-18 18:33:11 +00:00
|
|
|
gui.popupTip("Thrust Reverser " ~ (i ? "ON" : "OFF"));
|
2004-02-19 14:16:23 +00:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</button>
|
|
|
|
|
2006-10-21 10:21:45 +00:00
|
|
|
<button n="1">
|
|
|
|
<name>Left Button</name>
|
|
|
|
<desc>flaps up, +F3: gear up, +F4: previous view</desc>
|
2004-02-19 14:16:23 +00:00
|
|
|
<repeatable type="bool">false</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
2005-06-19 18:25:57 +00:00
|
|
|
m = get_mode();
|
|
|
|
if (m == 0) {
|
2006-06-24 18:18:01 +00:00
|
|
|
if (kbdctrl.getBoolValue()) {
|
|
|
|
controls.weaponSelect(-1);
|
|
|
|
} else {
|
|
|
|
controls.flapsDown(-1);
|
|
|
|
}
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 1) {
|
2005-06-22 13:08:01 +00:00
|
|
|
controls.gearDown(-1);
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 2) {
|
2004-02-19 14:16:23 +00:00
|
|
|
view.stepView(-1);
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 3) {
|
2004-02-19 14:16:23 +00:00
|
|
|
#
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
2005-06-22 13:08:01 +00:00
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
m = get_mode();
|
|
|
|
if (m == 0) {
|
2005-07-01 05:20:24 +00:00
|
|
|
controls.flapsDown(0);
|
2005-06-22 13:08:01 +00:00
|
|
|
} elsif (m == 1) {
|
|
|
|
controls.gearDown(0);
|
|
|
|
} elsif (m == 2) {
|
|
|
|
#
|
|
|
|
} elsif (m == 3) {
|
|
|
|
#
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
2004-02-19 14:16:23 +00:00
|
|
|
</button>
|
|
|
|
|
2006-10-21 10:21:45 +00:00
|
|
|
<button n="2">
|
|
|
|
<name>Middle Button</name>
|
|
|
|
<desc>center view, +F3: toggle tail-wheel lock, +F4: reset view, +F3+F4: reset trim</desc>
|
2004-02-19 14:16:23 +00:00
|
|
|
<repeatable type="bool">false</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
2005-06-19 18:25:57 +00:00
|
|
|
m = get_mode();
|
|
|
|
if (m == 0) {
|
2004-02-19 14:16:23 +00:00
|
|
|
view.resetView();
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 1) {
|
2005-06-13 06:41:30 +00:00
|
|
|
i = !getprop("/controls/gear/tailwheel-lock");
|
|
|
|
setprop("/controls/gear/tailwheel-lock", i);
|
2007-06-11 19:23:15 +00:00
|
|
|
gui.popupTip("Tail Wheel " ~ (i ? "LOCKED" : "UNLOCKED"));
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 2) {
|
2004-02-19 14:16:23 +00:00
|
|
|
setprop("/sim/current-view/view-number", 0);
|
|
|
|
view.resetView();
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 3) {
|
2004-02-19 14:16:23 +00:00
|
|
|
setprop("/controls/flight/elevator-trim", 0);
|
|
|
|
setprop("/controls/flight/aileron-trim", 0);
|
|
|
|
setprop("/controls/flight/rudder-trim", 0);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</button>
|
2002-09-07 11:10:04 +00:00
|
|
|
|
2006-10-21 10:21:45 +00:00
|
|
|
<button n="3">
|
|
|
|
<name>Right Button</name>
|
2006-10-21 13:51:42 +00:00
|
|
|
<desc>flaps down, +Ctrl: weapon select, +F3: gear down, +F4: next view</desc>
|
2004-02-19 14:16:23 +00:00
|
|
|
<repeatable type="bool">false</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
2005-06-19 18:25:57 +00:00
|
|
|
m = get_mode();
|
|
|
|
if (m == 0) {
|
2006-06-24 18:18:01 +00:00
|
|
|
if (kbdctrl.getBoolValue()) {
|
|
|
|
controls.weaponSelect(1);
|
|
|
|
} else {
|
|
|
|
controls.flapsDown(1);
|
|
|
|
}
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 1) {
|
2005-06-16 07:59:33 +00:00
|
|
|
controls.gearDown(1);
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 2) {
|
2004-02-19 14:16:23 +00:00
|
|
|
view.stepView(1);
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 3) {
|
2004-02-19 14:16:23 +00:00
|
|
|
#
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
2005-06-22 13:08:01 +00:00
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
m = get_mode();
|
|
|
|
if (m == 0) {
|
2005-07-01 05:20:24 +00:00
|
|
|
controls.flapsDown(0);
|
2005-06-22 13:08:01 +00:00
|
|
|
} elsif (m == 1) {
|
|
|
|
controls.gearDown(0);
|
|
|
|
} elsif (m == 2) {
|
|
|
|
#
|
|
|
|
} elsif (m == 3) {
|
|
|
|
#
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
2004-02-19 14:16:23 +00:00
|
|
|
</button>
|
|
|
|
|
2006-10-21 10:21:45 +00:00
|
|
|
<button n="4">
|
|
|
|
<name>F1</name>
|
|
|
|
<desc>brakes left, +F4: zoom out</desc>
|
2006-03-02 17:05:45 +00:00
|
|
|
<repeatable type="bool">true</repeatable>
|
2004-02-19 14:16:23 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
2006-03-01 18:42:37 +00:00
|
|
|
f1 = 1;
|
2005-06-19 18:25:57 +00:00
|
|
|
m = get_mode();
|
|
|
|
if (m == 0) {
|
2006-03-02 17:05:45 +00:00
|
|
|
if (!left_brake) {
|
|
|
|
controls.applyBrakes(left_brake = 1, -1);
|
|
|
|
}
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 1) {
|
2004-02-19 14:16:23 +00:00
|
|
|
#
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 2) {
|
2006-03-02 17:05:45 +00:00
|
|
|
f2 ? view.resetFOV() : view.increase();
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 3) {
|
2004-02-19 14:16:23 +00:00
|
|
|
#
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
2006-03-01 18:42:37 +00:00
|
|
|
f1 = 0;
|
2005-06-19 18:25:57 +00:00
|
|
|
m = get_mode();
|
|
|
|
if (m == 0) {
|
2006-03-02 17:05:45 +00:00
|
|
|
controls.applyBrakes(left_brake = 0, -1);
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 1) {
|
2004-02-19 14:16:23 +00:00
|
|
|
#
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 2) {
|
2006-03-09 22:32:04 +00:00
|
|
|
#
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 3) {
|
2004-02-19 14:16:23 +00:00
|
|
|
#
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</button>
|
|
|
|
|
2006-10-21 10:21:45 +00:00
|
|
|
<button n="5">
|
|
|
|
<name>F2</name>
|
|
|
|
<desc>brakes right, +F4: zoom in</desc>
|
2006-03-02 17:05:45 +00:00
|
|
|
<repeatable type="bool">true</repeatable>
|
2004-02-19 14:16:23 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
2006-03-01 18:42:37 +00:00
|
|
|
f2 = 1;
|
2005-06-19 18:25:57 +00:00
|
|
|
m = get_mode();
|
|
|
|
if (m == 0) {
|
2006-03-02 17:05:45 +00:00
|
|
|
if (!right_brake) {
|
|
|
|
controls.applyBrakes(right_brake = 1, 1);
|
|
|
|
}
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 1) {
|
2004-02-19 14:16:23 +00:00
|
|
|
#
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 2) {
|
2006-03-02 17:05:45 +00:00
|
|
|
f1 ? view.resetFOV() : view.decrease();
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 3) {
|
2004-02-19 14:16:23 +00:00
|
|
|
#
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
2006-03-01 18:42:37 +00:00
|
|
|
f2 = 0;
|
2005-06-19 18:25:57 +00:00
|
|
|
m = get_mode();
|
|
|
|
if (m == 0) {
|
2006-03-02 17:05:45 +00:00
|
|
|
controls.applyBrakes(right_brake = 0, 1);
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 1) {
|
2004-02-19 14:16:23 +00:00
|
|
|
#
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 2) {
|
2006-03-09 22:32:04 +00:00
|
|
|
#
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 3) {
|
2004-02-19 14:16:23 +00:00
|
|
|
#
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</button>
|
|
|
|
|
2006-10-21 13:51:42 +00:00
|
|
|
<button n="6"><!-- bit 0 -->
|
2006-10-21 10:21:45 +00:00
|
|
|
<name>F3</name>
|
2006-10-21 13:51:42 +00:00
|
|
|
<desc>modifier for other buttons</desc>
|
2004-02-19 14:16:23 +00:00
|
|
|
<repeatable type="bool">false</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
2005-06-19 17:29:56 +00:00
|
|
|
m = modifier.getValue();
|
2005-06-13 06:41:30 +00:00
|
|
|
if (m == 0 or m == 2) {
|
2005-06-19 17:29:56 +00:00
|
|
|
modifier.setIntValue(m + 1);
|
2004-02-19 14:16:23 +00:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
2005-06-19 17:29:56 +00:00
|
|
|
m = modifier.getValue();
|
2005-06-13 06:41:30 +00:00
|
|
|
if (m == 1 or m == 3) {
|
2005-06-19 17:29:56 +00:00
|
|
|
modifier.setIntValue(m - 1);
|
2004-02-19 14:16:23 +00:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</button>
|
|
|
|
|
2006-10-21 13:51:42 +00:00
|
|
|
<button n="7"><!-- bit 1 -->
|
2006-10-21 10:21:45 +00:00
|
|
|
<name>F4</name>
|
2006-10-21 13:51:42 +00:00
|
|
|
<desc>modifier for other buttons</desc>
|
2004-02-19 14:16:23 +00:00
|
|
|
<repeatable type="bool">false</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
2005-06-19 17:29:56 +00:00
|
|
|
m = modifier.getValue();
|
2005-06-13 06:41:30 +00:00
|
|
|
if (m == 0 or m == 1) {
|
2005-06-19 17:29:56 +00:00
|
|
|
modifier.setIntValue(m + 2);
|
2004-02-19 14:16:23 +00:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
2005-06-19 17:29:56 +00:00
|
|
|
m = modifier.getValue();
|
2005-06-13 06:41:30 +00:00
|
|
|
if (m == 2 or m == 3) {
|
2005-06-19 17:29:56 +00:00
|
|
|
modifier.setIntValue(m - 2);
|
2004-02-19 14:16:23 +00:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</button>
|
|
|
|
|
2006-10-21 10:21:45 +00:00
|
|
|
<button n="8">
|
|
|
|
<name>>></name>
|
|
|
|
<desc>unused</desc>
|
2004-02-19 14:16:23 +00:00
|
|
|
<repeatable type="bool">false</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
<![CDATA[
|
|
|
|
text = "read $FG_ROOT/Input/Joysticks/Saitek/Cyborg-Gold-3d-USB.xml";
|
|
|
|
print("Please " ~ text ~ " for the full joystick layout.");
|
|
|
|
gui.popupTip(text);
|
|
|
|
]]>
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
2006-10-21 10:21:45 +00:00
|
|
|
<button n="9">
|
|
|
|
<name><<</name>
|
|
|
|
<desc>unused</desc>
|
2004-02-19 14:16:23 +00:00
|
|
|
<repeatable type="bool">false</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
<![CDATA[
|
|
|
|
text = "read $FG_ROOT/Input/Joysticks/Saitek/Cyborg-Gold-3d-USB.xml";
|
|
|
|
print("Please " ~ text ~ " for the full joystick layout.");
|
|
|
|
gui.popupTip(text);
|
|
|
|
]]>
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
2006-10-21 10:21:45 +00:00
|
|
|
<button n="10">
|
|
|
|
<name>Hat Up</name>
|
|
|
|
<desc>view up, +F3: increase prop pitch, +F4: elevator trim down</desc>
|
2004-02-19 14:16:23 +00:00
|
|
|
<repeatable>true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
2005-06-19 18:25:57 +00:00
|
|
|
m = get_mode();
|
|
|
|
if (m == 0) {
|
2004-02-19 14:16:23 +00:00
|
|
|
view.panViewPitch(1);
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 1) {
|
2004-02-19 14:16:23 +00:00
|
|
|
controls.adjPropeller(1);
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 2) {
|
2004-02-19 14:16:23 +00:00
|
|
|
controls.elevatorTrim(0.75);
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 3) {
|
2004-02-19 14:16:23 +00:00
|
|
|
#
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
2006-10-21 10:21:45 +00:00
|
|
|
<button n="11">
|
|
|
|
<name>Hat Left</name>
|
|
|
|
<desc>view left, +F3: mixture leaner, +F4: aileron trim left, +F3+F4: rudder trim left</desc>
|
2004-02-19 14:16:23 +00:00
|
|
|
<repeatable>true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
2005-06-19 18:25:57 +00:00
|
|
|
m = get_mode();
|
|
|
|
if (m == 0) {
|
2004-02-19 14:16:23 +00:00
|
|
|
v = getprop("/sim/current-view/view-number");
|
2007-10-09 20:44:41 +00:00
|
|
|
view.panViewDir(-viewdir[v]);
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 1) {
|
2004-04-06 16:47:57 +00:00
|
|
|
controls.adjMixture(-1);
|
2005-06-19 17:29:56 +00:00
|
|
|
harrier();
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 2) {
|
2004-02-19 14:16:23 +00:00
|
|
|
controls.aileronTrim(-0.75);
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 3) {
|
2004-02-19 14:16:23 +00:00
|
|
|
controls.rudderTrim(-0.75);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
2006-10-21 10:21:45 +00:00
|
|
|
<button n="12">
|
|
|
|
<name>Hat Right</name>
|
|
|
|
<desc>view right, +F3: mixture richer, +F4: aileron trim right, +F3+F4: rudder trim right</desc>
|
2004-02-19 14:16:23 +00:00
|
|
|
<repeatable>true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
2005-06-19 18:25:57 +00:00
|
|
|
m = get_mode();
|
|
|
|
if (m == 0) {
|
2004-02-19 14:16:23 +00:00
|
|
|
v = getprop("/sim/current-view/view-number");
|
2007-10-09 20:44:41 +00:00
|
|
|
view.panViewDir(viewdir[v]);
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 1) {
|
2004-04-06 16:47:57 +00:00
|
|
|
controls.adjMixture(1);
|
2005-06-19 17:29:56 +00:00
|
|
|
harrier();
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 2) {
|
2004-02-19 14:16:23 +00:00
|
|
|
controls.aileronTrim(0.75);
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 3) {
|
2005-06-19 17:29:56 +00:00
|
|
|
controls.rudderTrim(0.75);
|
2004-02-19 14:16:23 +00:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
2006-10-21 10:21:45 +00:00
|
|
|
<button n="13">
|
|
|
|
<name>Hat Down</name>
|
|
|
|
<desc>view down, +F3: decrease prop pitch, +F4: elevator trim up</desc>
|
2004-02-19 14:16:23 +00:00
|
|
|
<repeatable>true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
2005-06-19 18:25:57 +00:00
|
|
|
m = get_mode();
|
|
|
|
if (m == 0) {
|
2004-02-19 14:16:23 +00:00
|
|
|
view.panViewPitch(-1);
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 1) {
|
2004-02-19 14:16:23 +00:00
|
|
|
controls.adjPropeller(-1);
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 2) {
|
2004-02-19 14:16:23 +00:00
|
|
|
controls.elevatorTrim(-0.75);
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 3) {
|
2004-02-19 14:16:23 +00:00
|
|
|
#
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
</PropertyList>
|
2002-09-07 11:10:04 +00:00
|
|
|
|