2006-11-07 05:29:43 +00:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
Bindings for THRUSTMASTER HOTAS Cougar stick/throttle combination.
|
|
|
|
|
|
|
|
Matthias Boerner <matthias-boerner@t-online.de>
|
|
|
|
-->
|
|
|
|
|
|
|
|
<PropertyList>
|
2007-01-21 18:34:48 +00:00
|
|
|
<name type="string">Thrustmaster Thrustmaster HOTAS Cougar</name>
|
|
|
|
<name type="string">Thrustmaster HOTAS Cougar</name>
|
2006-11-07 05:29:43 +00:00
|
|
|
|
2007-01-21 18:34:48 +00:00
|
|
|
<!-- begin definition of modifier button, on HOTAS: Pinky Switch -->
|
|
|
|
<button n="2">
|
|
|
|
<desc>modifier button 0</desc>
|
|
|
|
<repeatable type="bool">false</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
name = "/input/joysticks/js/button[2]";
|
|
|
|
mod = getprop(name);
|
|
|
|
if (mod == nil) {
|
|
|
|
setprop(name, 1);
|
|
|
|
} elsif (mod == 0) {
|
|
|
|
setprop(name, mod + 1);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
name = "/input/joysticks/js[0]/button[2]";
|
|
|
|
mod = getprop(name);
|
|
|
|
if (mod == nil) {
|
|
|
|
setprop(name, 0);
|
|
|
|
} elsif (mod == 1) {
|
|
|
|
setprop(name, mod - 1);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</button>
|
|
|
|
<!-- end definition of modifier button -->
|
|
|
|
|
|
|
|
<!-- begin main axis configuration -->
|
2006-11-07 05:29:43 +00:00
|
|
|
<axis>
|
|
|
|
<desc>Aileron</desc>
|
|
|
|
<number>
|
|
|
|
<unix>0</unix>
|
|
|
|
<windows>0</windows>
|
|
|
|
</number>
|
|
|
|
<binding>
|
|
|
|
<command>property-scale</command>
|
|
|
|
<property>/controls/flight/aileron</property>
|
|
|
|
</binding>
|
|
|
|
</axis>
|
|
|
|
|
|
|
|
<axis>
|
|
|
|
<desc>Elevator</desc>
|
|
|
|
<number>
|
|
|
|
<unix>1</unix>
|
|
|
|
<windows>1</windows>
|
|
|
|
</number>
|
|
|
|
<binding>
|
|
|
|
<command>property-scale</command>
|
|
|
|
<property>/controls/flight/elevator</property>
|
|
|
|
<factor type="double">-1.0</factor>
|
|
|
|
</binding>
|
|
|
|
</axis>
|
|
|
|
|
|
|
|
<axis>
|
|
|
|
<desc>Throttle</desc>
|
|
|
|
<number>
|
|
|
|
<unix>2</unix>
|
2007-01-21 18:34:48 +00:00
|
|
|
<windows>2</windows>
|
2006-11-07 05:29:43 +00:00
|
|
|
</number>
|
|
|
|
<binding>
|
2007-01-21 18:34:48 +00:00
|
|
|
<command>nasal</command>
|
|
|
|
<script>controls.throttleAxis()</script>
|
2006-11-07 05:29:43 +00:00
|
|
|
</binding>
|
|
|
|
</axis>
|
2007-01-21 18:34:48 +00:00
|
|
|
<!-- end main axis configuration -->
|
2006-11-07 05:29:43 +00:00
|
|
|
|
|
|
|
<!-- begin trim configuration -->
|
2007-01-21 18:34:48 +00:00
|
|
|
<!-- button on HOTAS: Trim and Pinky Switch -->
|
2006-11-07 05:29:43 +00:00
|
|
|
<axis n="6">
|
2007-01-21 18:34:48 +00:00
|
|
|
<desc>elevation trim/reset elevation trim</desc>
|
|
|
|
<low>
|
|
|
|
<repeatable>true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
mod = getprop("/input/joysticks/js[0]/button[2]");
|
|
|
|
if (mod == nil or mod == 0) {
|
|
|
|
controls.elevatorTrim(1)
|
|
|
|
} elsif (mod == 1) {
|
|
|
|
setprop("/controls/flight/elevator-trim", 0);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</low>
|
|
|
|
<high>
|
|
|
|
<repeatable>true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
mod = getprop("/input/joysticks/js[0]/button[2]");
|
|
|
|
if (mod == nil or mod == 0) {
|
|
|
|
controls.elevatorTrim(-1)
|
|
|
|
} elsif (mod == 1) {
|
|
|
|
setprop("/controls/flight/elevator-trim", 0);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</high>
|
|
|
|
</axis>
|
|
|
|
|
|
|
|
<axis n="5">
|
|
|
|
<desc>aileron trim/reset aileron trim</desc>
|
|
|
|
<low>
|
|
|
|
<repeatable>true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
mod = getprop("/input/joysticks/js[0]/button[2]");
|
|
|
|
if (mod == nil or mod == 0) {
|
|
|
|
controls.aileronTrim(-1)
|
|
|
|
} elsif (mod == 1) {
|
|
|
|
setprop("/controls/flight/aileron-trim", 0);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</low>
|
|
|
|
<high>
|
|
|
|
<repeatable>true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
mod = getprop("/input/joysticks/js[0]/button[2]");
|
|
|
|
if (mod == nil or mod == 0) {
|
|
|
|
controls.aileronTrim(1)
|
|
|
|
} elsif (mod == 1) {
|
|
|
|
setprop("/controls/flight/aileron-trim", 0);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</high>
|
|
|
|
</axis>
|
|
|
|
|
|
|
|
<!-- button on HOTAS: Countermeasures Management and Pinky Switch -->
|
|
|
|
<button n="17">
|
|
|
|
<desc>rudder trim left/reset rudder trim</desc>
|
2006-11-07 05:29:43 +00:00
|
|
|
<repeatable>true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
2007-01-21 18:34:48 +00:00
|
|
|
<script>
|
|
|
|
mod = getprop("/input/joysticks/js[0]/button[2]");
|
|
|
|
if (mod == nil or mod == 0) {
|
|
|
|
controls.rudderTrim(-1)
|
|
|
|
} elsif (mod == 1) {
|
|
|
|
setprop("/controls/flight/rudder-trim", 0);
|
|
|
|
}
|
|
|
|
</script>
|
2006-11-07 05:29:43 +00:00
|
|
|
</binding>
|
2007-01-21 18:34:48 +00:00
|
|
|
</button>
|
|
|
|
|
|
|
|
<button n="15">
|
|
|
|
<desc>rudder trim right/reset rudder trim</desc>
|
2006-11-07 05:29:43 +00:00
|
|
|
<repeatable>true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
2007-01-21 18:34:48 +00:00
|
|
|
<script>
|
|
|
|
mod = getprop("/input/joysticks/js[0]/button[2]");
|
|
|
|
if (mod == nil or mod == 0) {
|
|
|
|
controls.rudderTrim(1)
|
|
|
|
} elsif (mod == 1) {
|
|
|
|
setprop("/controls/flight/rudder-trim", 0);
|
|
|
|
}
|
|
|
|
</script>
|
2006-11-07 05:29:43 +00:00
|
|
|
</binding>
|
2007-01-21 18:34:48 +00:00
|
|
|
</button>
|
|
|
|
|
2006-11-07 05:29:43 +00:00
|
|
|
<!-- end trim configuration -->
|
|
|
|
|
|
|
|
<!-- begin view configuration -->
|
2007-01-21 18:34:48 +00:00
|
|
|
<!-- button on HOTAS: Display Management and Pinky Switch -->
|
|
|
|
<button n="10">
|
|
|
|
<desc>view up/view reset</desc>
|
|
|
|
<repeatable>true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
mod = getprop("/input/joysticks/js[0]/button[2]");
|
|
|
|
if (mod == nil or mod == 0) {
|
|
|
|
view.panViewPitch(1)
|
|
|
|
} elsif (mod == 1) {
|
|
|
|
view.resetView()
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</button>
|
2006-11-07 05:29:43 +00:00
|
|
|
|
2007-01-21 18:34:48 +00:00
|
|
|
<button n="12">
|
|
|
|
<desc>view down/view reset</desc>
|
2006-11-07 05:29:43 +00:00
|
|
|
<repeatable>true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
2007-01-21 18:34:48 +00:00
|
|
|
<script>
|
|
|
|
mod = getprop("/input/joysticks/js[0]/button[2]");
|
|
|
|
if (mod == nil or mod == 0) {
|
|
|
|
view.panViewPitch(-1)
|
|
|
|
} elsif (mod == 1) {
|
|
|
|
view.resetView()
|
|
|
|
}
|
|
|
|
</script>
|
2006-11-07 05:29:43 +00:00
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
2007-01-21 18:34:48 +00:00
|
|
|
<button n="11">
|
|
|
|
<desc>view right/view reset</desc>
|
2006-11-07 05:29:43 +00:00
|
|
|
<repeatable>true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
2007-01-21 18:34:48 +00:00
|
|
|
<script>
|
|
|
|
mod = getprop("/input/joysticks/js[0]/button[2]");
|
|
|
|
if (mod == nil or mod == 0) {
|
|
|
|
view.panViewDir(-1)
|
|
|
|
} elsif (mod == 1) {
|
|
|
|
view.resetView()
|
|
|
|
}
|
|
|
|
</script>
|
2006-11-07 05:29:43 +00:00
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button n="13">
|
2007-01-21 18:34:48 +00:00
|
|
|
<desc>view left/view reset</desc>
|
2006-11-07 05:29:43 +00:00
|
|
|
<repeatable>true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
2007-01-21 18:34:48 +00:00
|
|
|
<script>
|
|
|
|
mod = getprop("/input/joysticks/js[0]/button[2]");
|
|
|
|
if (mod == nil or mod == 0) {
|
|
|
|
view.panViewDir(1)
|
|
|
|
} elsif (mod == 1) {
|
|
|
|
view.resetView()
|
|
|
|
}
|
|
|
|
</script>
|
2006-11-07 05:29:43 +00:00
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
<!-- end view configuration -->
|
|
|
|
|
|
|
|
<!-- begin switch view configuration -->
|
2007-01-21 18:34:48 +00:00
|
|
|
<!-- button on HOTAS: Target Management right and Pinky Switch -->
|
|
|
|
<button n="7">
|
|
|
|
<desc>switch view - forward/reset view to cockpit view</desc>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
mod = getprop("/input/joysticks/js[0]/button[2]");
|
|
|
|
if (mod == nil or mod == 0) {
|
|
|
|
view.stepView(1)
|
|
|
|
} elsif (mod == 1) {
|
|
|
|
setprop("/sim/current-view/view-number", 0);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<!-- button on HOTAS: Target Management left and Pinky Switch -->
|
|
|
|
<button n="9">
|
|
|
|
<desc>switch view - backward/reset view to cockpit view</desc>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
mod = getprop("/input/joysticks/js[0]/button[2]");
|
|
|
|
if (mod == nil or mod == 0) {
|
|
|
|
view.stepView(-1)
|
|
|
|
} elsif (mod == 1) {
|
|
|
|
setprop("/sim/current-view/view-number", 0);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
2006-11-07 05:29:43 +00:00
|
|
|
<!-- end switch view configuration -->
|
|
|
|
|
|
|
|
<!-- begin zoom configuration (FOV)-->
|
2007-01-21 18:34:48 +00:00
|
|
|
<!-- button on HOTAS: Communications Switch and Pinky Switch -->
|
|
|
|
<button n="6">
|
|
|
|
<desc>zoom in/reset zoom</desc>
|
|
|
|
<repeatable>true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
mod = getprop("/input/joysticks/js[0]/button[2]");
|
|
|
|
if (mod == nil or mod == 0) {
|
|
|
|
view.decrease(1);
|
|
|
|
} elsif (mod == 1) {
|
|
|
|
setprop("/sim/current-view/field-of-view", 55);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button n="8">
|
|
|
|
<desc>zoom out/reset zoom</desc>
|
|
|
|
<repeatable>true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
mod = getprop("/input/joysticks/js[0]/button[2]");
|
|
|
|
if (mod == nil or mod == 0) {
|
|
|
|
view.increase(1);
|
|
|
|
} elsif (mod == 1) {
|
|
|
|
setprop("/sim/current-view/field-of-view", 55);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</button>
|
2006-11-07 05:29:43 +00:00
|
|
|
<!-- end zoom configuration (FOV)-->
|
|
|
|
|
2007-01-21 18:34:48 +00:00
|
|
|
<!-- begin speedbrake configuration -->
|
|
|
|
<!-- button on HOTAS: SpeedBrake -->
|
|
|
|
<button n="27">
|
|
|
|
<desc>speedbrake</desc>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>setprop("/controls/flight/speedbrake", 1)</script>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>setprop("/controls/flight/speedbrake", 0)</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</button>
|
|
|
|
<!-- end speedbrake configuration -->
|
2006-12-27 09:26:28 +00:00
|
|
|
|
2006-11-07 05:29:43 +00:00
|
|
|
<!-- begin gear configuration -->
|
2007-01-21 18:34:48 +00:00
|
|
|
<!-- button on HOTAS: Manual Range/Uncage Switch and Pinky Switch -->
|
|
|
|
<button n="23">
|
|
|
|
<desc>gear up or down/tail wheel lock</desc>
|
|
|
|
<repeatable type="bool">false</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
mod = getprop("/input/joysticks/js[0]/button[2]");
|
|
|
|
if (mod == nil or mod == 0) {
|
|
|
|
gearToggle = getprop("/controls/gear/gear-down");
|
|
|
|
if (gearToggle == 1) {
|
|
|
|
controls.gearDown(-1);
|
|
|
|
gui.popupTip("Gear up!");
|
|
|
|
} else {
|
|
|
|
controls.gearDown(1);
|
|
|
|
gui.popupTip("Gear down!");
|
|
|
|
}
|
|
|
|
} elsif (mod == 1) {
|
|
|
|
tailwheelLock = getprop("/controls/gear/tailwheel-lock");
|
|
|
|
if (tailwheelLock == 1) {
|
|
|
|
setprop("/controls/gear/tailwheel-lock", 0);
|
|
|
|
gui.popupTip("Tailwheel unlocked!");
|
|
|
|
} else {
|
|
|
|
setprop("/controls/gear/tailwheel-lock", 1);
|
|
|
|
gui.popupTip("Tailwheel locked!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<!-- begin nose wheel configuration -->
|
|
|
|
<button n="4">
|
|
|
|
<desc>nose wheel on/off</desc>
|
|
|
|
<repeatable type="bool">false</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal></command>
|
|
|
|
<script>
|
|
|
|
nosewheel = getprop("/controls/gear/nose-wheel-steering");
|
|
|
|
if (nosewheel == 1) {
|
|
|
|
setprop("/controls/gear/nose-wheel-steering", 0);
|
|
|
|
gui.popupTip("Nose wheel steering on!");
|
|
|
|
} else {
|
|
|
|
setprop("/controls/gear/nose-wheel-steering", 1);
|
|
|
|
gui.popupTip("Nose wheel steering off!");
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
<!-- end nose wheel steering configuration -->
|
2006-11-07 05:29:43 +00:00
|
|
|
<!-- end gear configuration -->
|
|
|
|
|
|
|
|
<!-- begin flaps configuration -->
|
2007-01-21 18:34:48 +00:00
|
|
|
<!-- botton on HOTAS: Countermeasures Management up/down and Pinky Switch -->
|
|
|
|
<button n="14">
|
|
|
|
<desc>flaps up</desc>
|
|
|
|
<repeatable type="bool">false</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
mod = getprop("/input/joysticks/js[0]/button[2]");
|
|
|
|
if (mod == nil or mod == 0) {
|
|
|
|
controls.flapsDown(-1)
|
|
|
|
} elsif (mod == 1) {
|
|
|
|
setprop("/controls/flight/flaps", 0);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button n="16">
|
|
|
|
<desc>flaps down</desc>
|
|
|
|
<repeatable type="bool">false</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
mod = getprop("/input/joysticks/js[0]/button[2]");
|
|
|
|
if (mod == nil or mod == 0) {
|
|
|
|
controls.flapsDown(1)
|
|
|
|
} elsif (mod == 1) {
|
|
|
|
setprop("/controls/flight/flaps", 0);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</button>
|
2006-11-07 05:29:43 +00:00
|
|
|
<!-- end flaps configuration -->
|
|
|
|
|
2007-01-21 18:34:48 +00:00
|
|
|
<!-- begin thrust reverse configuration -->
|
|
|
|
<!-- button on HOTAS: Dogfight left-->
|
|
|
|
<button n="24">
|
|
|
|
<desc>thrust reverse</desc>
|
|
|
|
<repeatable type="bool">false</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
props.setAll("/controls/engines/engine", "reverser", 1);
|
|
|
|
gui.popupTip("Thrust reverse on!");
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
props.setAll("/controls/engines/engine", "reverser", 0);
|
|
|
|
gui.popupTip("Thrust reverse off!");
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</button>
|
|
|
|
<!-- end thrust reverse configuration -->
|
|
|
|
|
|
|
|
<!-- begin tailhook configuration -->
|
|
|
|
<!-- button on HOTAS: Dogfight right-->
|
|
|
|
<button n="25">
|
|
|
|
<desc>thrust reverse</desc>
|
|
|
|
<repeatable type="bool">false</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
setprop("/controls/gear/tailhook", 1);
|
|
|
|
gui.popupTip("Tailhook down!");
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
setprop("/controls/gear/tailhook", 0);
|
|
|
|
gui.popupTip("Tailhook up!");
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</button>
|
|
|
|
<!-- end tailhook configuration -->
|
|
|
|
|
|
|
|
</PropertyList>
|