| 1 |
<?xml version="1.0"?> |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
<PropertyList> |
| 10 |
<name type="string">Thrustmaster Thrustmaster HOTAS Cougar</name> |
| 11 |
<name type="string">Thrustmaster HOTAS Cougar</name> |
| 12 |
|
| 13 |
|
| 14 |
<button n="2"> |
| 15 |
<desc>modifier button 0</desc> |
| 16 |
<repeatable type="bool">false</repeatable> |
| 17 |
<binding> |
| 18 |
<command>nasal</command> |
| 19 |
<script> |
| 20 |
name = "/input/joysticks/js/button[2]"; |
| 21 |
mod = getprop(name); |
| 22 |
if (mod == nil) { |
| 23 |
setprop(name, 1); |
| 24 |
} elsif (mod == 0) { |
| 25 |
setprop(name, mod + 1); |
| 26 |
} |
| 27 |
</script> |
| 28 |
</binding> |
| 29 |
<mod-up> |
| 30 |
<binding> |
| 31 |
<command>nasal</command> |
| 32 |
<script> |
| 33 |
name = "/input/joysticks/js[0]/button[2]"; |
| 34 |
mod = getprop(name); |
| 35 |
if (mod == nil) { |
| 36 |
setprop(name, 0); |
| 37 |
} elsif (mod == 1) { |
| 38 |
setprop(name, mod - 1); |
| 39 |
} |
| 40 |
</script> |
| 41 |
</binding> |
| 42 |
</mod-up> |
| 43 |
</button> |
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
<axis> |
| 48 |
<desc>Aileron</desc> |
| 49 |
<number> |
| 50 |
<unix>0</unix> |
| 51 |
<windows>0</windows> |
| 52 |
</number> |
| 53 |
<binding> |
| 54 |
<command>property-scale</command> |
| 55 |
<property>/controls/flight/aileron</property> |
| 56 |
</binding> |
| 57 |
</axis> |
| 58 |
|
| 59 |
<axis> |
| 60 |
<desc>Elevator</desc> |
| 61 |
<number> |
| 62 |
<unix>1</unix> |
| 63 |
<windows>1</windows> |
| 64 |
</number> |
| 65 |
<binding> |
| 66 |
<command>property-scale</command> |
| 67 |
<property>/controls/flight/elevator</property> |
| 68 |
<factor type="double">-1.0</factor> |
| 69 |
</binding> |
| 70 |
</axis> |
| 71 |
|
| 72 |
<axis> |
| 73 |
<desc>Throttle</desc> |
| 74 |
<number> |
| 75 |
<unix>2</unix> |
| 76 |
<windows>2</windows> |
| 77 |
</number> |
| 78 |
<binding> |
| 79 |
<command>nasal</command> |
| 80 |
<script>controls.throttleAxis()</script> |
| 81 |
</binding> |
| 82 |
</axis> |
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
<axis n="6"> |
| 88 |
<desc>elevation trim/reset elevation trim</desc> |
| 89 |
<low> |
| 90 |
<repeatable>true</repeatable> |
| 91 |
<binding> |
| 92 |
<command>nasal</command> |
| 93 |
<script> |
| 94 |
mod = getprop("/input/joysticks/js[0]/button[2]"); |
| 95 |
if (mod == nil or mod == 0) { |
| 96 |
controls.elevatorTrim(1) |
| 97 |
} elsif (mod == 1) { |
| 98 |
setprop("/controls/flight/elevator-trim", 0); |
| 99 |
} |
| 100 |
</script> |
| 101 |
</binding> |
| 102 |
</low> |
| 103 |
<high> |
| 104 |
<repeatable>true</repeatable> |
| 105 |
<binding> |
| 106 |
<command>nasal</command> |
| 107 |
<script> |
| 108 |
mod = getprop("/input/joysticks/js[0]/button[2]"); |
| 109 |
if (mod == nil or mod == 0) { |
| 110 |
controls.elevatorTrim(-1) |
| 111 |
} elsif (mod == 1) { |
| 112 |
setprop("/controls/flight/elevator-trim", 0); |
| 113 |
} |
| 114 |
</script> |
| 115 |
</binding> |
| 116 |
</high> |
| 117 |
</axis> |
| 118 |
|
| 119 |
<axis n="5"> |
| 120 |
<desc>aileron trim/reset aileron trim</desc> |
| 121 |
<low> |
| 122 |
<repeatable>true</repeatable> |
| 123 |
<binding> |
| 124 |
<command>nasal</command> |
| 125 |
<script> |
| 126 |
mod = getprop("/input/joysticks/js[0]/button[2]"); |
| 127 |
if (mod == nil or mod == 0) { |
| 128 |
controls.aileronTrim(-1) |
| 129 |
} elsif (mod == 1) { |
| 130 |
setprop("/controls/flight/aileron-trim", 0); |
| 131 |
} |
| 132 |
</script> |
| 133 |
</binding> |
| 134 |
</low> |
| 135 |
<high> |
| 136 |
<repeatable>true</repeatable> |
| 137 |
<binding> |
| 138 |
<command>nasal</command> |
| 139 |
<script> |
| 140 |
mod = getprop("/input/joysticks/js[0]/button[2]"); |
| 141 |
if (mod == nil or mod == 0) { |
| 142 |
controls.aileronTrim(1) |
| 143 |
} elsif (mod == 1) { |
| 144 |
setprop("/controls/flight/aileron-trim", 0); |
| 145 |
} |
| 146 |
</script> |
| 147 |
</binding> |
| 148 |
</high> |
| 149 |
</axis> |
| 150 |
|
| 151 |
|
| 152 |
<button n="17"> |
| 153 |
<desc>rudder trim left/reset rudder trim</desc> |
| 154 |
<repeatable>true</repeatable> |
| 155 |
<binding> |
| 156 |
<command>nasal</command> |
| 157 |
<script> |
| 158 |
mod = getprop("/input/joysticks/js[0]/button[2]"); |
| 159 |
if (mod == nil or mod == 0) { |
| 160 |
controls.rudderTrim(-1) |
| 161 |
} elsif (mod == 1) { |
| 162 |
setprop("/controls/flight/rudder-trim", 0); |
| 163 |
} |
| 164 |
</script> |
| 165 |
</binding> |
| 166 |
</button> |
| 167 |
|
| 168 |
<button n="15"> |
| 169 |
<desc>rudder trim right/reset rudder trim</desc> |
| 170 |
<repeatable>true</repeatable> |
| 171 |
<binding> |
| 172 |
<command>nasal</command> |
| 173 |
<script> |
| 174 |
mod = getprop("/input/joysticks/js[0]/button[2]"); |
| 175 |
if (mod == nil or mod == 0) { |
| 176 |
controls.rudderTrim(1) |
| 177 |
} elsif (mod == 1) { |
| 178 |
setprop("/controls/flight/rudder-trim", 0); |
| 179 |
} |
| 180 |
</script> |
| 181 |
</binding> |
| 182 |
</button> |
| 183 |
|
| 184 |
|
| 185 |
|
| 186 |
|
| 187 |
|
| 188 |
<button n="10"> |
| 189 |
<desc>view up/view reset</desc> |
| 190 |
<repeatable>true</repeatable> |
| 191 |
<binding> |
| 192 |
<command>nasal</command> |
| 193 |
<script> |
| 194 |
mod = getprop("/input/joysticks/js[0]/button[2]"); |
| 195 |
if (mod == nil or mod == 0) { |
| 196 |
view.panViewPitch(1) |
| 197 |
} elsif (mod == 1) { |
| 198 |
view.resetView() |
| 199 |
} |
| 200 |
</script> |
| 201 |
</binding> |
| 202 |
</button> |
| 203 |
|
| 204 |
<button n="12"> |
| 205 |
<desc>view down/view reset</desc> |
| 206 |
<repeatable>true</repeatable> |
| 207 |
<binding> |
| 208 |
<command>nasal</command> |
| 209 |
<script> |
| 210 |
mod = getprop("/input/joysticks/js[0]/button[2]"); |
| 211 |
if (mod == nil or mod == 0) { |
| 212 |
view.panViewPitch(-1) |
| 213 |
} elsif (mod == 1) { |
| 214 |
view.resetView() |
| 215 |
} |
| 216 |
</script> |
| 217 |
</binding> |
| 218 |
</button> |
| 219 |
|
| 220 |
<button n="11"> |
| 221 |
<desc>view right/view reset</desc> |
| 222 |
<repeatable>true</repeatable> |
| 223 |
<binding> |
| 224 |
<command>nasal</command> |
| 225 |
<script> |
| 226 |
mod = getprop("/input/joysticks/js[0]/button[2]"); |
| 227 |
if (mod == nil or mod == 0) { |
| 228 |
view.panViewDir(-1) |
| 229 |
} elsif (mod == 1) { |
| 230 |
view.resetView() |
| 231 |
} |
| 232 |
</script> |
| 233 |
</binding> |
| 234 |
</button> |
| 235 |
|
| 236 |
<button n="13"> |
| 237 |
<desc>view left/view reset</desc> |
| 238 |
<repeatable>true</repeatable> |
| 239 |
<binding> |
| 240 |
<command>nasal</command> |
| 241 |
<script> |
| 242 |
mod = getprop("/input/joysticks/js[0]/button[2]"); |
| 243 |
if (mod == nil or mod == 0) { |
| 244 |
view.panViewDir(1) |
| 245 |
} elsif (mod == 1) { |
| 246 |
view.resetView() |
| 247 |
} |
| 248 |
</script> |
| 249 |
</binding> |
| 250 |
</button> |
| 251 |
|
| 252 |
|
| 253 |
|
| 254 |
|
| 255 |
<button n="7"> |
| 256 |
<desc>switch view - forward/reset view to cockpit view</desc> |
| 257 |
<binding> |
| 258 |
<command>nasal</command> |
| 259 |
<script> |
| 260 |
mod = getprop("/input/joysticks/js[0]/button[2]"); |
| 261 |
if (mod == nil or mod == 0) { |
| 262 |
view.stepView(1) |
| 263 |
} elsif (mod == 1) { |
| 264 |
setprop("/sim/current-view/view-number", 0); |
| 265 |
} |
| 266 |
</script> |
| 267 |
</binding> |
| 268 |
</button> |
| 269 |
|
| 270 |
|
| 271 |
<button n="9"> |
| 272 |
<desc>switch view - backward/reset view to cockpit view</desc> |
| 273 |
<binding> |
| 274 |
<command>nasal</command> |
| 275 |
<script> |
| 276 |
mod = getprop("/input/joysticks/js[0]/button[2]"); |
| 277 |
if (mod == nil or mod == 0) { |
| 278 |
view.stepView(-1) |
| 279 |
} elsif (mod == 1) { |
| 280 |
setprop("/sim/current-view/view-number", 0); |
| 281 |
} |
| 282 |
</script> |
| 283 |
</binding> |
| 284 |
</button> |
| 285 |
|
| 286 |
|
| 287 |
|
| 288 |
|
| 289 |
|
| 290 |
<button n="6"> |
| 291 |
<desc>zoom in/reset zoom</desc> |
| 292 |
<repeatable>true</repeatable> |
| 293 |
<binding> |
| 294 |
<command>nasal</command> |
| 295 |
<script> |
| 296 |
mod = getprop("/input/joysticks/js[0]/button[2]"); |
| 297 |
if (mod == nil or mod == 0) { |
| 298 |
view.decrease(1); |
| 299 |
} elsif (mod == 1) { |
| 300 |
setprop("/sim/current-view/field-of-view", 55); |
| 301 |
} |
| 302 |
</script> |
| 303 |
</binding> |
| 304 |
</button> |
| 305 |
|
| 306 |
<button n="8"> |
| 307 |
<desc>zoom out/reset zoom</desc> |
| 308 |
<repeatable>true</repeatable> |
| 309 |
<binding> |
| 310 |
<command>nasal</command> |
| 311 |
<script> |
| 312 |
mod = getprop("/input/joysticks/js[0]/button[2]"); |
| 313 |
if (mod == nil or mod == 0) { |
| 314 |
view.increase(1); |
| 315 |
} elsif (mod == 1) { |
| 316 |
setprop("/sim/current-view/field-of-view", 55); |
| 317 |
} |
| 318 |
</script> |
| 319 |
</binding> |
| 320 |
</button> |
| 321 |
|
| 322 |
|
| 323 |
|
| 324 |
|
| 325 |
<button n="27"> |
| 326 |
<desc>speedbrake</desc> |
| 327 |
<binding> |
| 328 |
<command>nasal</command> |
| 329 |
<script>setprop("/controls/flight/speedbrake", 1)</script> |
| 330 |
</binding> |
| 331 |
<mod-up> |
| 332 |
<binding> |
| 333 |
<command>nasal</command> |
| 334 |
<script>setprop("/controls/flight/speedbrake", 0)</script> |
| 335 |
</binding> |
| 336 |
</mod-up> |
| 337 |
</button> |
| 338 |
|
| 339 |
|
| 340 |
|
| 341 |
|
| 342 |
<button n="23"> |
| 343 |
<desc>gear up or down/tail wheel lock</desc> |
| 344 |
<repeatable type="bool">false</repeatable> |
| 345 |
<binding> |
| 346 |
<command>nasal</command> |
| 347 |
<script> |
| 348 |
mod = getprop("/input/joysticks/js[0]/button[2]"); |
| 349 |
if (mod == nil or mod == 0) { |
| 350 |
gearToggle = getprop("/controls/gear/gear-down"); |
| 351 |
if (gearToggle == 1) { |
| 352 |
controls.gearDown(-1); |
| 353 |
gui.popupTip("Gear up!"); |
| 354 |
} else { |
| 355 |
controls.gearDown(1); |
| 356 |
gui.popupTip("Gear down!"); |
| 357 |
} |
| 358 |
} elsif (mod == 1) { |
| 359 |
tailwheelLock = getprop("/controls/gear/tailwheel-lock"); |
| 360 |
if (tailwheelLock == 1) { |
| 361 |
setprop("/controls/gear/tailwheel-lock", 0); |
| 362 |
gui.popupTip("Tailwheel unlocked!"); |
| 363 |
} else { |
| 364 |
setprop("/controls/gear/tailwheel-lock", 1); |
| 365 |
gui.popupTip("Tailwheel locked!"); |
| 366 |
} |
| 367 |
} |
| 368 |
</script> |
| 369 |
</binding> |
| 370 |
</button> |
| 371 |
|
| 372 |
|
| 373 |
<button n="4"> |
| 374 |
<desc>nose wheel on/off</desc> |
| 375 |
<repeatable type="bool">false</repeatable> |
| 376 |
<binding> |
| 377 |
<command>nasal</command> |
| 378 |
<script> |
| 379 |
nosewheel = getprop("/controls/gear/nose-wheel-steering"); |
| 380 |
if (nosewheel == 1) { |
| 381 |
setprop("/controls/gear/nose-wheel-steering", 0); |
| 382 |
gui.popupTip("Nose wheel steering on!"); |
| 383 |
} else { |
| 384 |
setprop("/controls/gear/nose-wheel-steering", 1); |
| 385 |
gui.popupTip("Nose wheel steering off!"); |
| 386 |
} |
| 387 |
</script> |
| 388 |
</binding> |
| 389 |
</button> |
| 390 |
|
| 391 |
|
| 392 |
|
| 393 |
|
| 394 |
|
| 395 |
<button n="14"> |
| 396 |
<desc>flaps up</desc> |
| 397 |
<repeatable type="bool">false</repeatable> |
| 398 |
<binding> |
| 399 |
<command>nasal</command> |
| 400 |
<script> |
| 401 |
mod = getprop("/input/joysticks/js[0]/button[2]"); |
| 402 |
if (mod == nil or mod == 0) { |
| 403 |
controls.flapsDown(-1) |
| 404 |
} elsif (mod == 1) { |
| 405 |
setprop("/controls/flight/flaps", 0); |
| 406 |
} |
| 407 |
</script> |
| 408 |
</binding> |
| 409 |
</button> |
| 410 |
|
| 411 |
<button n="16"> |
| 412 |
<desc>flaps down</desc> |
| 413 |
<repeatable type="bool">false</repeatable> |
| 414 |
<binding> |
| 415 |
<command>nasal</command> |
| 416 |
<script> |
| 417 |
mod = getprop("/input/joysticks/js[0]/button[2]"); |
| 418 |
if (mod == nil or mod == 0) { |
| 419 |
controls.flapsDown(1) |
| 420 |
} elsif (mod == 1) { |
| 421 |
setprop("/controls/flight/flaps", 0); |
| 422 |
} |
| 423 |
</script> |
| 424 |
</binding> |
| 425 |
</button> |
| 426 |
|
| 427 |
|
| 428 |
|
| 429 |
|
| 430 |
<button n="24"> |
| 431 |
<desc>thrust reverse</desc> |
| 432 |
<repeatable type="bool">false</repeatable> |
| 433 |
<binding> |
| 434 |
<command>nasal</command> |
| 435 |
<script> |
| 436 |
props.setAll("/controls/engines/engine", "reverser", 1); |
| 437 |
gui.popupTip("Thrust reverse on!"); |
| 438 |
</script> |
| 439 |
</binding> |
| 440 |
<mod-up> |
| 441 |
<binding> |
| 442 |
<command>nasal</command> |
| 443 |
<script> |
| 444 |
props.setAll("/controls/engines/engine", "reverser", 0); |
| 445 |
gui.popupTip("Thrust reverse off!"); |
| 446 |
</script> |
| 447 |
</binding> |
| 448 |
</mod-up> |
| 449 |
</button> |
| 450 |
|
| 451 |
|
| 452 |
|
| 453 |
|
| 454 |
<button n="25"> |
| 455 |
<desc>thrust reverse</desc> |
| 456 |
<repeatable type="bool">false</repeatable> |
| 457 |
<binding> |
| 458 |
<command>nasal</command> |
| 459 |
<script> |
| 460 |
setprop("/controls/gear/tailhook", 1); |
| 461 |
gui.popupTip("Tailhook down!"); |
| 462 |
</script> |
| 463 |
</binding> |
| 464 |
<mod-up> |
| 465 |
<binding> |
| 466 |
<command>nasal</command> |
| 467 |
<script> |
| 468 |
setprop("/controls/gear/tailhook", 0); |
| 469 |
gui.popupTip("Tailhook up!"); |
| 470 |
</script> |
| 471 |
</binding> |
| 472 |
</mod-up> |
| 473 |
</button> |
| 474 |
|
| 475 |
|
| 476 |
</PropertyList> |