fbef57eab3
- add :%0 to :%4 for OSG on-screen statistics levels (3 and 4 need OSG/HEAD) - add setpropf() and getpropf() functions
1329 lines
30 KiB
XML
1329 lines
30 KiB
XML
<?xml version="1.0"?>
|
|
|
|
<!--
|
|
This file defines vi-like key sequences which are started with the ':'-key.
|
|
It's evaluated by $FG_ROOT/Nasal/multikey.nas.
|
|
|
|
- <Esc> always aborts.
|
|
- <Return>/<Enter> executes and terminates the command mode, given that
|
|
<binding>s exist (use "null" if there's nothing else to do) and <no-exit/>
|
|
isn't defined.
|
|
- Keys with defined <exit/> property execute their bindings immediately,
|
|
that is: without having to press <Return>/<Enter>.
|
|
- Format placeholder values are available to Nasal code via arg[].
|
|
- Nasal code can set the dialog title by assignment to the _ variable.
|
|
- <key> indices aren't used by the system, but are recommended to allow
|
|
reliable overwriting by aircraft or user xml files.
|
|
- Cursor keys are equivalent to characters <, >, ^, _.
|
|
-->
|
|
|
|
<PropertyList>
|
|
<nasal>
|
|
<script>
|
|
<![CDATA[
|
|
var clamp = func(val, min, max) {
|
|
return (val > max) ? max : (val < min) ? min : val;
|
|
}
|
|
|
|
var adjustprop = func(path, offset, min = -1, max = 1) {
|
|
var val = getprop(path) + offset;
|
|
setprop(path, clamp(val, min, max));
|
|
return val;
|
|
}
|
|
|
|
var setpropf = func {
|
|
var val = pop(arg);
|
|
setprop(call(sprintf, arg), val);
|
|
}
|
|
|
|
var getpropf = func {
|
|
getprop(call(sprintf, arg));
|
|
}
|
|
]]>
|
|
</script>
|
|
</nasal>
|
|
|
|
<key n="37">
|
|
<name>%%</name>
|
|
<desc>On-screen statistics</desc>
|
|
<key n="48">
|
|
<name>0</name>
|
|
<desc>Statistics: off</desc>
|
|
<exit/>
|
|
<binding>
|
|
<command>property-assign</command>
|
|
<property>/sim/rendering/on-screen-statistics</property>
|
|
<value>0</value>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="49">
|
|
<name>1</name>
|
|
<desc>Statistics: frame rate</desc>
|
|
<exit/>
|
|
<binding>
|
|
<command>property-assign</command>
|
|
<property>/sim/rendering/on-screen-statistics</property>
|
|
<value>1</value>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="50">
|
|
<name>2</name>
|
|
<desc>Statistics: viewer</desc>
|
|
<exit/>
|
|
<binding>
|
|
<command>property-assign</command>
|
|
<property>/sim/rendering/on-screen-statistics</property>
|
|
<value>2</value>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="51">
|
|
<name>3</name>
|
|
<desc>Statistics: camera scene</desc>
|
|
<exit/>
|
|
<binding>
|
|
<command>property-assign</command>
|
|
<property>/sim/rendering/on-screen-statistics</property>
|
|
<value>3</value>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="52">
|
|
<name>4</name>
|
|
<desc>Statistics: viewer scene</desc>
|
|
<exit/>
|
|
<binding>
|
|
<command>property-assign</command>
|
|
<property>/sim/rendering/on-screen-statistics</property>
|
|
<value>4</value>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="58">
|
|
<name>:</name>
|
|
<desc>User commands</desc>
|
|
<!-- reserved for user extensions -->
|
|
</key>
|
|
|
|
<key n="63">
|
|
<name>?</name>
|
|
<desc>Help</desc>
|
|
<exit/>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>multikey.help()</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="65">
|
|
<name>A</name>
|
|
<desc>Aircraft</desc>
|
|
<!-- reserved for aircraft extensions -->
|
|
</key>
|
|
|
|
<key n="68">
|
|
<name>D</name>
|
|
<desc>Dialogs</desc>
|
|
<key n="97">
|
|
<name>a</name>
|
|
<desc>Autopilot Settings</desc>
|
|
<exit/>
|
|
<binding>
|
|
<command>dialog-show</command>
|
|
<dialog-name>autopilot</dialog-name>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="99">
|
|
<name>c</name>
|
|
<desc>Clouds</desc>
|
|
<exit/>
|
|
<binding>
|
|
<command>dialog-show</command>
|
|
<dialog-name>clouds</dialog-name>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="102">
|
|
<name>f</name>
|
|
<desc>Fuel and Payload</desc>
|
|
<exit/>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>gui.showWeightDialog()</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="103">
|
|
<name>g</name>
|
|
<desc>GPS Settings</desc>
|
|
<exit/>
|
|
<binding>
|
|
<command>dialog-show</command>
|
|
<dialog-name>gps</dialog-name>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="105">
|
|
<name>i</name>
|
|
<desc>Instrument Settings</desc>
|
|
<exit/>
|
|
<binding>
|
|
<command>dialog-show</command>
|
|
<dialog-name>instruments</dialog-name>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="109">
|
|
<name>m</name>
|
|
<desc>Multiplayer Pilot List</desc>
|
|
<exit/>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>multiplayer.dialog.show()</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="112">
|
|
<name>p</name>
|
|
<desc>Position aircraft</desc>
|
|
<key n="97">
|
|
<name>a</name>
|
|
<desc>Position aircraft in air</desc>
|
|
<exit/>
|
|
<binding>
|
|
<command>dialog-show</command>
|
|
<dialog-name>location-in-air</dialog-name>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="103">
|
|
<name>g</name>
|
|
<desc>Position aircraft on ground</desc>
|
|
<exit/>
|
|
<binding>
|
|
<command>dialog-show</command>
|
|
<dialog-name>location-on-ground</dialog-name>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="114">
|
|
<name>r</name>
|
|
<desc>Radio Settings</desc>
|
|
<exit/>
|
|
<binding>
|
|
<command>dialog-show</command>
|
|
<dialog-name>radios</dialog-name>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="115">
|
|
<name>s</name>
|
|
<desc>Sound Configuration</desc>
|
|
<exit/>
|
|
<binding>
|
|
<command>dialog-show</command>
|
|
<dialog-name>sound-dialog</dialog-name>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="116">
|
|
<name>t</name>
|
|
<desc>Time Settings</desc>
|
|
<exit/>
|
|
<binding>
|
|
<command>dialog-show</command>
|
|
<dialog-name>timeofday</dialog-name>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="118">
|
|
<name>v</name>
|
|
<desc>View options</desc>
|
|
<exit/>
|
|
<binding>
|
|
<command>dialog-show</command>
|
|
<dialog-name>view</dialog-name>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="119">
|
|
<name>w</name>
|
|
<desc>Weather Conditions</desc>
|
|
<exit/>
|
|
<binding>
|
|
<command>dialog-show</command>
|
|
<dialog-name>weather</dialog-name>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
|
|
<!-- environment -->
|
|
<key n="69">
|
|
<name>E</name>
|
|
<desc>Environment</desc>
|
|
<key n="69">
|
|
<name>w</name>
|
|
<desc>Weather</desc>
|
|
<key n="119">
|
|
<name>s</name>
|
|
<desc>Weather Scenario</desc>
|
|
<key n="115">
|
|
<name>f</name>
|
|
<desc>Weather Scenerio = Fair weather</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>
|
|
setprop("/environment/weather-scenario", "Fair weather");
|
|
setprop("/environment/rebuild-layers", getprop("/environment/rebuild-layers") + 1);
|
|
</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="109">
|
|
<name>m</name>
|
|
<desc>Weather Scenerio = METAR</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>
|
|
setprop("/environment/weather-scenario", "METAR");
|
|
setprop("/environment/rebuild-layers", getprop("/environment/rebuild-layers") + 1);
|
|
</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="110">
|
|
<name>n</name>
|
|
<desc>Weather Scenerio = none</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>
|
|
setprop("/environment/weather-scenario", "none");
|
|
setprop("/environment/rebuild-layers", getprop("/environment/rebuild-layers") + 1);
|
|
</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="116">
|
|
<name>t</name>
|
|
<desc>Weather Scenerio = Thunderstorm</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>
|
|
setprop("/environment/weather-scenario", "Thunderstorm");
|
|
setprop("/environment/rebuild-layers", getprop("/environment/rebuild-layers") + 1);
|
|
</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="116">
|
|
<name>t</name>
|
|
<desc>Time Settings</desc>
|
|
<!-- only Clock Time and noon are implemented -->
|
|
<key n="99">
|
|
<name>c</name>
|
|
<desc>Time = Clock Time</desc>
|
|
<binding>
|
|
<command>timeofday</command>
|
|
<timeofday>real</timeofday>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="110">
|
|
<name>n</name>
|
|
<desc>Time = noon</desc>
|
|
<binding>
|
|
<command>timeofday</command>
|
|
<timeofday>noon</timeofday>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
</key>
|
|
|
|
<!-- Position commands -->
|
|
<nasal>
|
|
<script>
|
|
<![CDATA[
|
|
var setpresets = func(airportID, runwayID = "", lon = -9999, lat = -9999, alt = 0,
|
|
speed = 0, distance = 0, glideslope = 0, heading = 9999) {
|
|
setprop("/sim/presets/airport-id", airportID);
|
|
setprop("/sim/presets/runway", runwayID);
|
|
setprop("/sim/presets/longitude-deg", lon);
|
|
setprop("/sim/presets/latitude-deg", lat);
|
|
setprop("/sim/presets/altitude-ft", alt);
|
|
setprop("/sim/presets/airspeed-kt", speed);
|
|
setprop("/sim/presets/offset-distance-nm", distance);
|
|
setprop("/sim/presets/offset-azimuth-nm", 0);
|
|
setprop("/sim/presets/glideslope-deg", glideslope);
|
|
setprop("/sim/presets/heading-deg", heading);
|
|
}
|
|
]]>
|
|
</script>
|
|
</nasal>
|
|
|
|
<key n="80">
|
|
<name>P</name>
|
|
<desc>Position</desc>
|
|
<key n="103">
|
|
<name>g</name>
|
|
<desc>Position on ground</desc>
|
|
<key n="903">
|
|
<name>%s</name>
|
|
<desc>Position on ground: airport=%s</desc>
|
|
<key n="32">
|
|
<name> </name>
|
|
<desc>Position on ground: airport=%s runway=</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>setpresets(arg[0])</script>
|
|
</binding>
|
|
<binding>
|
|
<command>presets-commit</command>
|
|
</binding>
|
|
<key n="903">
|
|
<name>%s</name>
|
|
<desc>Position on ground: airport=%s runway=%s</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>setpresets(arg[0], arg[1])</script>
|
|
</binding>
|
|
<binding>
|
|
<command>presets-commit</command>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
</key>
|
|
</key>
|
|
</key>
|
|
|
|
<!-- Autopilot multikey commands -->
|
|
<key n="97">
|
|
<name>a</name>
|
|
<desc>Autopilot</desc>
|
|
<key n="104">
|
|
<name>h</name>
|
|
<desc>Heading Control</desc>
|
|
<key n="119">
|
|
<name>w</name>
|
|
<desc>Wing Level</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>setprop("/autopilot/locks/heading", "wing-leveler")</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="98">
|
|
<name>b</name>
|
|
<desc>Heading Bug</desc>
|
|
<key n="901">
|
|
<name>%f</name>
|
|
<desc>Heading Bug = %.3f degree</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>
|
|
setprop("/autopilot/locks/heading", "dg-heading-hold");
|
|
setprop("/autopilot/settings/heading-bug-deg", arg[0]);
|
|
</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="116">
|
|
<name>t</name>
|
|
<desc>True Heading</desc>
|
|
<key n="901">
|
|
<name>%f</name>
|
|
<desc>True Heading = %.3f degree</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>
|
|
setprop("/autopilot/locks/heading", "true-heading-hold");
|
|
setprop("/autopilot/settings/true-heading-deg", arg[0]);
|
|
</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="110">
|
|
<name>n</name>
|
|
<desc>Nav1 Hold</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>setprop("/autopilot/locks/heading", "nav1-hold")</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="47">
|
|
<name>/</name>
|
|
<desc>Heading control: disable</desc>
|
|
<binding>
|
|
<command>property-assign</command>
|
|
<property>/autopilot/locks/heading</property>
|
|
<value></value>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="118">
|
|
<name>v</name>
|
|
<desc>Velocity control</desc>
|
|
<key n="116">
|
|
<name>t</name>
|
|
<desc>Speed with throttle</desc>
|
|
<key n="901">
|
|
<name>%f</name>
|
|
<desc>Speed with throttle = %.1f knots</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>
|
|
setprop("/autopilot/settings/target-speed-kt", arg[0]);
|
|
setprop("/autopilot/locks/speed", "speed-with-throttle");
|
|
</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="112">
|
|
<name>p</name>
|
|
<desc>Speed with pitch</desc>
|
|
<key n="901">
|
|
<name>%f</name>
|
|
<desc>Speed with pitch = %.2f knots</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>
|
|
setprop("/autopilot/settings/target-speed-kt", arg[0]);
|
|
setprop("/autopilot/locks/speed", "speed-with-pitch-trim");
|
|
</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="47">
|
|
<name>/</name>
|
|
<desc>Velocity control: disable</desc>
|
|
<binding>
|
|
<command>property-assign</command>
|
|
<property>/autopilot/locks/speed</property>
|
|
<value></value>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="112">
|
|
<name>p</name>
|
|
<desc>Pitch/Altitude control</desc>
|
|
<key n="118">
|
|
<name>v</name>
|
|
<desc>Vertical Speed Hold</desc>
|
|
<key n="901">
|
|
<name>%f</name>
|
|
<desc>Vertical Speed = %.2f fpm</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>
|
|
setprop("/autopilot/settings/vertical-speed-fpm", arg[0]);
|
|
setprop("/autopilot/locks/altitude", "vertical-speed-hold");
|
|
</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="112">
|
|
<name>p</name>
|
|
<desc>Pitch hold</desc>
|
|
<key n="901">
|
|
<name>%f</name>
|
|
<desc>Pitch angle = %.1f degree</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>
|
|
setprop("/autopilot/settings/target-pitch-degree", arg[0]);
|
|
setprop("/autopilot/locks/altitude", "pitch-hold");
|
|
</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="111">
|
|
<name>o</name>
|
|
<desc>AoA hold</desc>
|
|
<key n="901">
|
|
<name>%f</name>
|
|
<desc>AoA angle = %.1f degree</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>
|
|
setprop("/autopilot/settings/target-aoa-degree", arg[0]);
|
|
setprop("/autopilot/locks/altitude", "aoa-hold");
|
|
</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="97">
|
|
<name>a</name>
|
|
<desc>Altitude hold</desc>
|
|
<key n="901">
|
|
<name>%f</name>
|
|
<desc>Target altitude = %.2f feet</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>
|
|
setprop("/autopilot/settings/target-altitude-ft", arg[0]);
|
|
setprop("/autopilot/locks/altitude", "altitude-hold");
|
|
</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="103">
|
|
<name>g</name>
|
|
<desc>AGL hold</desc>
|
|
<key n="901">
|
|
<name>%f</name>
|
|
<desc>Target AGL = %.1f feet</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>
|
|
setprop("/autopilot/settings/target-agl-ft", arg[0]);
|
|
setprop("/autopilot/locks/altitude", "agl-hold");
|
|
</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="110">
|
|
<name>n</name>
|
|
<desc>Nav1 glideslope</desc>
|
|
<binding>
|
|
<command>property-assign</command>
|
|
<property>/autopilot/locks/altitude</property>
|
|
<value>gs1-hold</value>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="47">
|
|
<name>/</name>
|
|
<desc>Pitch/Altitude control: disable</desc>
|
|
<binding>
|
|
<command>property-assign</command>
|
|
<property>/autopilot/locks/altitude</property>
|
|
<value/>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="114">
|
|
<name>r</name>
|
|
<desc>Route Manager</desc>
|
|
<key n="97">
|
|
<name>a</name>
|
|
<desc>Append waypoint</desc>
|
|
<key n="903">
|
|
<name>%s</name>
|
|
<desc>Append waypoint: airport ID[@altitude] = %s</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>setprop("/autopilot/route-manager/input", arg[0])</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="99">
|
|
<name>c</name>
|
|
<desc>Clear waypoints</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>setprop("/autopilot/route-manager/input", "@clear")</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="100">
|
|
<name>d</name>
|
|
<desc>Delete waypoint</desc>
|
|
<key n="902">
|
|
<name>%u</name>
|
|
<desc>Delete waypoint at %u</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>
|
|
var command = sprintf("@delete%d", arg[0] > 0 ? arg[0] - 1 : 0);
|
|
setprop("/autopilot/route-manager/input", command);
|
|
</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="105">
|
|
<name>i</name>
|
|
<desc>Insert waypoint</desc>
|
|
<key n="902">
|
|
<name>%u</name>
|
|
<desc>Insert waypoint at %u</desc>
|
|
<key n="903">
|
|
<name>%s</name>
|
|
<desc>Insert waypoint at %u: airport ID = %s</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>
|
|
var command = sprintf("@insert%d:%s", arg[0] > 0 ? arg[0] - 1 : 0, arg[1]);
|
|
setprop("/autopilot/route-manager/input", command);
|
|
</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="112">
|
|
<name>p</name>
|
|
<desc>Remove first waypoint</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>setprop("/autopilot/route-manager/input", "@pop")</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
</key>
|
|
|
|
<nasal>
|
|
<script>
|
|
var slewEngineProp = func(format, index, prop, value) {
|
|
value = controls.slewProp("/controls/engines/engine[" ~ index ~ "]/" ~ prop, value);
|
|
_ = sprintf(format, index, value);
|
|
}
|
|
</script>
|
|
</nasal>
|
|
|
|
<key n="101">
|
|
<name>e</name>
|
|
<desc>Engines</desc>
|
|
<key n="109">
|
|
<name>m</name>
|
|
<desc>Mixture (0.0 to 1.0)</desc>
|
|
<binding>
|
|
<command>null</command>
|
|
</binding>
|
|
|
|
<key n="901">
|
|
<name>%f</name>
|
|
<desc>Mixture = %.3f</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>props.setAll("/controls/engines/engine", "mixture", arg[0])</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="94">
|
|
<name>^</name>
|
|
<desc>Mixture up</desc>
|
|
<no-exit/>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>_ = sprintf("Mixture = %.3f", controls.adjMixture(0.25))</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="95">
|
|
<name>_</name>
|
|
<desc>Mixture down</desc>
|
|
<no-exit/>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>_ = sprintf("Mixture = %.3f", controls.adjMixture(-0.25))</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="112">
|
|
<name>p</name>
|
|
<desc>Propeller pitch (0.0 to 1.0)</desc>
|
|
<binding>
|
|
<command>null</command>
|
|
</binding>
|
|
|
|
<key n="901">
|
|
<name>%f</name>
|
|
<desc>Propeller pitch = %.3f</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>props.setAll("/controls/engines/engine", "propeller-pitch", arg[0])</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="94">
|
|
<name>^</name>
|
|
<desc>Propeller pitch up</desc>
|
|
<no-exit/>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>_ = sprintf("Propeller pitch = %.3f", controls.adjPropeller(0.25))</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="95">
|
|
<name>_</name>
|
|
<desc>Propeller pitch down</desc>
|
|
<no-exit/>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>_ = sprintf("Propeller pitch = %.3f", controls.adjPropeller(-0.25))</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="116">
|
|
<name>t</name>
|
|
<desc>Throttle (0.0 to 1.0)</desc>
|
|
<binding>
|
|
<command>null</command>
|
|
</binding>
|
|
|
|
<key n="901">
|
|
<name>%f</name>
|
|
<desc>Throttle = %.3f</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>props.setAll("/controls/engines/engine", "throttle", arg[0])</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="94">
|
|
<name>^</name>
|
|
<desc>Throttle up</desc>
|
|
<no-exit/>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>_ = sprintf("Throttle = %.3f", controls.adjThrottle(0.25))</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="95">
|
|
<name>_</name>
|
|
<desc>Throttle down</desc>
|
|
<no-exit/>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>_ = sprintf("Throttle = %.3f", controls.adjThrottle(-0.25))</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="902">
|
|
<name>%u</name>
|
|
<desc>Engine #%u</desc>
|
|
<key n="109">
|
|
<name>m</name>
|
|
<desc>Mixture (0.0 to 1.0)</desc>
|
|
<binding>
|
|
<command>null</command>
|
|
</binding>
|
|
|
|
<key n="901">
|
|
<name>%f</name>
|
|
<desc>Mixture = %.3f</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>setprop("/controls/engines/engine[" ~ arg[0] ~ "]/mixture", arg[1])</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="94">
|
|
<name>^</name>
|
|
<desc>Mixture up</desc>
|
|
<no-exit/>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>slewEngineProp("Mixture #%u = %.3f", arg[0], "mixture", 0.25)</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="95">
|
|
<name>_</name>
|
|
<desc>Mixture down</desc>
|
|
<no-exit/>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>slewEngineProp("Mixture #%u = %.3f", arg[0], "mixture", -0.25)</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="112">
|
|
<name>p</name>
|
|
<desc>Propeller pitch (0.0 to 1.0)</desc>
|
|
<binding>
|
|
<command>null</command>
|
|
</binding>
|
|
|
|
<key n="901">
|
|
<name>%f</name>
|
|
<desc>Propeller pitch = %.3f</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>setprop("/controls/engines/engine[" ~ arg[0] ~ "]/propeller-pitch", arg[1])</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="94">
|
|
<name>^</name>
|
|
<desc>Propeller up</desc>
|
|
<no-exit/>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>slewEngineProp("Propeller pitch #%u = %.3f", arg[0], "propeller-pitch", 0.25)</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="95">
|
|
<name>_</name>
|
|
<desc>Propeller down</desc>
|
|
<no-exit/>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>slewEngineProp("Propeller pitch #%u = %.3f", arg[0], "propeller-pitch", -0.25)</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="116">
|
|
<name>t</name>
|
|
<desc>Throttle (0.0 to 1.0)</desc>
|
|
<binding>
|
|
<command>null</command>
|
|
</binding>
|
|
|
|
<key n="901">
|
|
<name>%f</name>
|
|
<desc>Throttle = %.3f</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>setprop("/controls/engines/engine[" ~ arg[0] ~ "]/throttle", arg[1])</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="94">
|
|
<name>^</name>
|
|
<desc>Throttle up</desc>
|
|
<no-exit/>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>slewEngineProp("Throttle #%u = %.3f", arg[0], "throttle", 0.25)</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="95">
|
|
<name>_</name>
|
|
<desc>Throttle down</desc>
|
|
<no-exit/>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>slewEngineProp("Throttle #%u = %.3f", arg[0], "throttle", -0.25)</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
</key>
|
|
</key>
|
|
|
|
<!-- Controls -->
|
|
<!-- Flight Controls -->
|
|
<key n="102">
|
|
<name>f</name>
|
|
<desc>Flight controls</desc>
|
|
<key n="97">
|
|
<name>a</name>
|
|
<desc>Aileron</desc>
|
|
<key n="901">
|
|
<name>%f</name>
|
|
<desc>Aileron adjustment: %.3f</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>adjustprop("/controls/flight/aileron", arg[0])</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="116">
|
|
<name>t</name>
|
|
<desc>Aileron trim</desc>
|
|
<binding>
|
|
<command>null</command>
|
|
</binding>
|
|
|
|
<key n="901">
|
|
<name>%f</name>
|
|
<desc>Aileron trim adjustment: %.3f</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>adjustprop("/controls/flight/aileron-trim", arg[0])</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="60">
|
|
<name><</name>
|
|
<desc>Aileron trim adjustment left</desc>
|
|
<no-exit/>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>_ = sprintf("Aileron trim = %.3f", controls.aileronTrim(-0.5))</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="62">
|
|
<name>></name>
|
|
<desc>Aileron trim adjustment right</desc>
|
|
<no-exit/>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>_ = sprintf("Aileron trim = %.3f", controls.aileronTrim(0.5))</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="101">
|
|
<name>e</name>
|
|
<desc>Elevator</desc>
|
|
<key n="901">
|
|
<name>%f</name>
|
|
<desc>Elevator adjustment: %.3f</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>adjustprop("/controls/flight/elevator", arg[0])</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="116">
|
|
<name>t</name>
|
|
<desc>Elevator trim</desc>
|
|
<binding>
|
|
<command>null</command>
|
|
</binding>
|
|
|
|
<key n="901">
|
|
<name>%f</name>
|
|
<desc>Elevator trim adjustment: %.3f</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>adjustprop("/controls/flight/elevator-trim", arg[0])</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="94">
|
|
<name>^</name>
|
|
<desc>Elevator trim adjustment down</desc>
|
|
<no-exit/>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>_ = sprintf("Elevator trim = %.3f", controls.elevatorTrim(0.5))</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="95">
|
|
<name>_</name>
|
|
<desc>Elevator trim adjustment up</desc>
|
|
<no-exit/>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>_ = sprintf("Elevator trim = %.3f", controls.elevatorTrim(-0.5))</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="114">
|
|
<name>r</name>
|
|
<desc>Rudder</desc>
|
|
<key n="901">
|
|
<name>%f</name>
|
|
<desc>Rudder adjustment: %.3f</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>adjustprop("/controls/flight/rudder", arg[0])</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<!-- Do we need absolute control position settings?
|
|
<key n="61">
|
|
<name>=</name>
|
|
<key n="37">
|
|
<name>%f</name>
|
|
<desc>Rudder = %.3f</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>setprop("/controls/flight/rudder-trim", arg[0])</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
-->
|
|
<key n="116">
|
|
<name>t</name>
|
|
<desc>Rudder trim</desc>
|
|
<binding>
|
|
<command>null</command>
|
|
</binding>
|
|
|
|
<key n="901">
|
|
<name>%f</name>
|
|
<desc>Rudder trim adjustment: %.3f</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>adjustprop("/controls/flight/rudder-trim", arg[0])</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="60">
|
|
<name><</name>
|
|
<desc>Rudder trim adjustment left</desc>
|
|
<no-exit/>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>_ = sprintf("Rudder trim = %.3f", controls.rudderTrim(-0.5))</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="62">
|
|
<name>></name>
|
|
<desc>Rudder trim adjustment right</desc>
|
|
<no-exit/>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>_ = sprintf("Rudder trim = %.3f", controls.rudderTrim(0.5))</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="105">
|
|
<name>i</name> <!-- FIXME: for good name -->
|
|
<desc>Initialize</desc>
|
|
<key n="97">
|
|
<name>a</name>
|
|
<desc>Initialize all trims</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>
|
|
setprop("/controls/flight/airelon-trim", 0);
|
|
setprop("/controls/flight/elevator-trim", 0);
|
|
setprop("/controls/flight/rudder-trim", 0);
|
|
</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="119">
|
|
<name>w</name>
|
|
<desc>Wing</desc>
|
|
<key n="102">
|
|
<name>f</name>
|
|
<desc>Toggle wing fold</desc>
|
|
<binding>
|
|
<command>property-toggle</command>
|
|
<property>/controls/flight/wing-fold</property>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="115">
|
|
<name>s</name>
|
|
<desc>Wing sweep</desc>
|
|
<key n="901">
|
|
<name>%f</name>
|
|
<desc>Wing sweep = %.3f</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>setprop("/controls/flight/wing-sweep", arg[0])</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
</key>
|
|
</key>
|
|
|
|
<nasal>
|
|
<script>
|
|
var radio_fmt = "/instrumentation/%s[%u]/frequencies/%s-mhz";
|
|
|
|
var setfreq = func(type, index, which, value) {
|
|
index = (index >= 1) ? index - 1 : 0;
|
|
setprop(sprintf(radio_fmt, type, index, which), value);
|
|
}
|
|
|
|
var togglefreq = func(type, index) {
|
|
index = (index >= 1) ? index - 1 : 0;
|
|
var sel = sprintf(radio_fmt, type, index, "selected");
|
|
var stby = sprintf(radio_fmt, type, index, "standby");
|
|
var s = getprop(stby);
|
|
setprop(stby, getprop(sel));
|
|
setprop(sel, s);
|
|
}
|
|
|
|
var settacan = func(number, letter) {
|
|
var ch = sprintf("%03u%s", number, letter);
|
|
var p = "/instrumentation/tacan/frequencies/selected-channel[%u]";
|
|
setpropf(p, 1, chr(ch[0]));
|
|
setpropf(p, 2, chr(ch[1]));
|
|
setpropf(p, 3, chr(ch[2]));
|
|
setpropf(p, 4, chr(ch[3]));
|
|
}
|
|
</script>
|
|
</nasal>
|
|
|
|
<key n="114">
|
|
<name>r</name>
|
|
<desc>Radio</desc>
|
|
|
|
<key n="97">
|
|
<name>a</name>
|
|
<desc>ADF</desc>
|
|
<key n="102">
|
|
<name>f</name>
|
|
<desc>ADF frequency = ? kHz</desc>
|
|
<key n="902">
|
|
<name>%u</name>
|
|
<desc>ADF frequency = %u kHz</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>setprop("/instrumentation/adf[0]/frequencies/selected-khz", arg[0])</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="99">
|
|
<name>c</name>
|
|
<desc>Comm</desc>
|
|
<key n="902">
|
|
<name>%u</name>
|
|
<desc>Comm%u</desc>
|
|
<key n="102">
|
|
<name>f</name>
|
|
<desc>Comm%u frequency = ? MHz</desc>
|
|
<key n="37">
|
|
<name>%f</name>
|
|
<desc>Comm%u frequency = %.3f MHz</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>setfreq("comm", arg[0], "selected", arg[1])</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="115">
|
|
<name>s</name>
|
|
<desc>Comm%u standby frequency = ? MHz</desc>
|
|
<key n="901">
|
|
<name>%f</name>
|
|
<desc>Comm%u standby frequency = %.3f MHz</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>setfreq("comm", arg[0], "standby", arg[1])</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="116">
|
|
<name>t</name>
|
|
<desc>Comm%u toggle selected/standby</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>togglefreq("comm", arg[0])</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="110">
|
|
<name>n</name>
|
|
<desc>Nav</desc>
|
|
<key n="902">
|
|
<name>%u</name>
|
|
<desc>Nav%u</desc>
|
|
<key n="102">
|
|
<name>f</name>
|
|
<desc>Nav%u frequency = ? MHz</desc>
|
|
<key n="901">
|
|
<name>%f</name>
|
|
<desc>Nav%u frequency = %.3f MHz</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>setfreq("nav", arg[0], "selected", arg[1])</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="115">
|
|
<name>s</name>
|
|
<desc>Nav%u standby frequency = ? MHz</desc>
|
|
<key n="901">
|
|
<name>%f</name>
|
|
<desc>Nav%u standby frequency = %.3f MHz</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>setfreq("nav", arg[0], "standby", arg[1])</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="116">
|
|
<name>t</name>
|
|
<desc>Nav%u toggle selected/standby</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>togglefreq("nav", arg[0])</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="116">
|
|
<name>t</name>
|
|
<desc>TACAN channel = ?</desc>
|
|
<key n="902">
|
|
<name>%3u</name>
|
|
<desc>TACAN channel = %u</desc>
|
|
<key n="120">
|
|
<name>x</name>
|
|
<desc>TACAN channel = %uX</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>settacan(arg[0], "X")</script>
|
|
</binding>
|
|
</key>
|
|
|
|
<key n="121">
|
|
<name>y</name>
|
|
<desc>TACAN channel = %uY</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>settacan(arg[0], "Y")</script>
|
|
</binding>
|
|
</key>
|
|
</key>
|
|
</key>
|
|
</key>
|
|
|
|
<key n="120">
|
|
<name>x</name>
|
|
<desc>Experimental</desc>
|
|
<!-- reserved for experimental features -->
|
|
</key>
|
|
|
|
<key n="902">
|
|
<name>%u</name>
|
|
<desc>Execute nasal-console tab #%u</desc>
|
|
<exit/>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>
|
|
fgcommand("nasal", props.Node.new({
|
|
module: "__nasal_console",
|
|
script: getprop("/sim/gui/dialogs/nasal-console/code[" ~ arg[0] ~ "]") or "",
|
|
}));
|
|
</script>
|
|
</binding>
|
|
</key>
|
|
</PropertyList>
|