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
|
|
|
|
|
|
|
|
|
|
|
___________________________________ 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>
|
|
|
|
<script><![CDATA[
|
2005-06-19 17:29:56 +00:00
|
|
|
data = props.globals.getNode(this).getNode("data");
|
|
|
|
mode = data.getNode("mode");
|
|
|
|
modifier = data.getNode("modifier");
|
2006-03-01 18:42:37 +00:00
|
|
|
f1 = f2 = 0;
|
2006-03-02 17:05:45 +00:00
|
|
|
left_brake = right_brake = 0;
|
2005-06-13 06:41:30 +00:00
|
|
|
|
2005-06-19 17:29:56 +00:00
|
|
|
get_mode = func { modifier.getValue() + mode.getValue() * 4 }
|
2005-06-13 06:41:30 +00:00
|
|
|
|
2005-06-19 17:29:56 +00:00
|
|
|
harrier = func {
|
2005-06-13 06:41:30 +00:00
|
|
|
if (getprop("/sim/aero") == "harrier") {
|
|
|
|
thv = getprop("/controls/engines/engine[0]/mixture");
|
|
|
|
gui.popupTip("Thrust vector " ~ int(thv * 120 - 20));
|
|
|
|
}
|
|
|
|
}
|
2005-06-19 17:29:56 +00:00
|
|
|
]]></script>
|
2005-06-13 06:41:30 +00:00
|
|
|
</nasal>
|
|
|
|
|
2004-02-19 14:16:23 +00:00
|
|
|
<axis n="0">
|
|
|
|
<desc>Aileron</desc>
|
|
|
|
<binding>
|
|
|
|
<command>property-scale</command>
|
|
|
|
<property>/controls/flight/aileron</property>
|
|
|
|
<power type="double">2.0</power>
|
|
|
|
</binding>
|
|
|
|
</axis>
|
2002-09-07 11:10:04 +00:00
|
|
|
|
2004-02-19 14:16:23 +00:00
|
|
|
<axis n="1">
|
|
|
|
<desc>Elevator</desc>
|
|
|
|
<binding>
|
|
|
|
<command>property-scale</command>
|
|
|
|
<property>/controls/flight/elevator</property>
|
|
|
|
<factor type="double">-1.0</factor>
|
|
|
|
<power type="double">2.0</power>
|
|
|
|
</binding>
|
|
|
|
</axis>
|
|
|
|
|
2004-04-29 09:14:14 +00:00
|
|
|
<axis>
|
2004-02-19 14:16:23 +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>
|
2004-02-26 14:51:04 +00:00
|
|
|
<power type="double">2.0</power>
|
2004-02-19 14:16:23 +00:00
|
|
|
</binding>
|
|
|
|
</axis>
|
|
|
|
|
2004-04-29 09:14:14 +00:00
|
|
|
<axis>
|
2004-02-19 14:16:23 +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>
|
|
|
|
|
|
|
|
<button n="0"><!-- trigger -->
|
|
|
|
<desc>Brakes</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-03-01 18:42:37 +00:00
|
|
|
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-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);
|
2005-06-13 06:41:30 +00:00
|
|
|
gui.popupTip("Parking Brake " ~ ["OFF", "ON"][i]);
|
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);
|
|
|
|
gui.popupTip("Speed Brake " ~ ["OFF", "ON"][i]);
|
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);
|
|
|
|
gui.popupTip("Thrust Reverser " ~ ["OFF", "ON"][i]);
|
2004-02-19 14:16:23 +00:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button n="1"><!-- left -->
|
|
|
|
<desc>Flaps/gear up; previous view</desc>
|
|
|
|
<repeatable type="bool">false</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
2005-06-19 18:25:57 +00:00
|
|
|
m = get_mode();
|
|
|
|
if (m == 0) {
|
2005-07-01 05:20:24 +00:00
|
|
|
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>
|
|
|
|
|
|
|
|
<button n="2"><!-- middle -->
|
|
|
|
<desc>Reset view; toggle tail-wheel lock; reset trim</desc>
|
|
|
|
<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);
|
|
|
|
gui.popupTip("Tail Wheel " ~ ["UNLOCKED", "LOCKED"][i]);
|
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
|
|
|
|
2004-02-19 14:16:23 +00:00
|
|
|
<button n="3"><!-- right -->
|
|
|
|
<desc>Flaps/gear down; next view</desc>
|
|
|
|
<repeatable type="bool">false</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
2005-06-19 18:25:57 +00:00
|
|
|
m = get_mode();
|
|
|
|
if (m == 0) {
|
2005-07-01 05:20:24 +00:00
|
|
|
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>
|
|
|
|
|
|
|
|
<button n="4"><!-- F1 -->
|
|
|
|
<desc>Brakes left</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-02 17:05:45 +00:00
|
|
|
vlp = nil;
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 3) {
|
2004-02-19 14:16:23 +00:00
|
|
|
#
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button n="5"><!-- F2 -->
|
|
|
|
<desc>Brakes right</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-02 17:05:45 +00:00
|
|
|
vlp = nil;
|
2005-06-19 18:25:57 +00:00
|
|
|
} elsif (m == 3) {
|
2004-02-19 14:16:23 +00:00
|
|
|
#
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button n="6"><!-- F3 -->
|
|
|
|
<desc>Modifier Bit 0</desc>
|
|
|
|
<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>
|
|
|
|
|
|
|
|
<button n="7"><!-- F4 -->
|
|
|
|
<desc>Modifier Bit 1</desc>
|
|
|
|
<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>
|
|
|
|
|
2005-06-13 06:41:30 +00:00
|
|
|
<button n="8"><!-- >> --> <!-- reserved for switching main-modes -->
|
2004-02-19 14:16:23 +00:00
|
|
|
<desc>free</desc>
|
|
|
|
<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>
|
|
|
|
|
2005-06-13 06:41:30 +00:00
|
|
|
<button n="9"><!-- << --> <!-- reserved for switching main-modes -->
|
2004-02-19 14:16:23 +00:00
|
|
|
<desc>free</desc>
|
|
|
|
<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>
|
|
|
|
|
|
|
|
<button n="10"><!-- hat up -->
|
|
|
|
<desc>View direction; prop pitch; elevator trim</desc>
|
|
|
|
<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>
|
|
|
|
|
|
|
|
<button n="11"><!-- hat left -->
|
|
|
|
<desc>View direction; mixture; aileron trim; rudder trim</desc>
|
|
|
|
<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");
|
2005-06-13 06:41:30 +00:00
|
|
|
view.panViewDir(v == 0 or v == 4 ? 1 : -1);
|
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>
|
|
|
|
|
|
|
|
<button n="12"><!-- hat right -->
|
|
|
|
<desc>View elevation; mixture; aileron trim; rudder trim</desc>
|
|
|
|
<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");
|
2005-06-13 06:41:30 +00:00
|
|
|
view.panViewDir(v == 0 or v == 4 ? -1 : 1);
|
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>
|
|
|
|
|
|
|
|
<button n="13"><!-- hat down -->
|
|
|
|
<desc>View direction; prop pitch; elevator trim</desc>
|
|
|
|
<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
|
|
|
|