<?xml version="1.0" encoding="UTF-8" ?>

<!-- Bombardier CRJ700 series -->
<!-- Simulator key bindings -->

<PropertyList>
	<!-- Developer key bindings (disabled for users) -->
	<!-- Overrides instant replay shortcut -->
    <!--
        <key n="18">
		<name>Ctrl-R</name>
		<desc>Reload interactive CDU</desc>
		<binding>
        <command>nasal</command>
        <script>
        CRJ700.cdu1.reload();
        </script>
		</binding>
        </key>
    -->
	<!-- Speedbrakes/spoilers -->
	<key n="2">
		<name>Ctrl-(Shift)-B</name>
		<desc>Cycle speedbrake setting (backward)</desc>
		<binding>
			<command>nasal</command>
			<script>
				controls.stepSpoilers(1);
            </script>
        </binding>
		<mod-shift>
			<binding>
				<command>nasal</command>
				<script>
					controls.stepSpoilers(-1);
                </script>
            </binding>
        </mod-shift>
    </key>
	<key n="100">
		<name>d</name>
		<desc>Step ground lift dumping setting to man. arm</desc>
		<binding>
			<command>nasal</command>
			<script>
				controls.stepGroundDump(1);
            </script>
        </binding>
    </key>
	<key n="68">
		<name>D</name>
		<desc>Step ground lift dumping setting to man. disarm</desc>
		<binding>
			<command>nasal</command>
			<script>
				controls.stepGroundDump(-1);
            </script>
        </binding>
    </key>
	<!-- Walk -->
	<key n="114">
		<name>r</name>
		<desc>Walk forward toward view</desc>
		<repeatable type="bool">true</repeatable>
		<binding>
			<command>nasal</command>
			<script>
				walk.walk_about(0.1);
            </script>
        </binding>
    </key>
    
	<key n="82">
		<name>R</name>
		<desc>Run forward toward view</desc>
		<repeatable type="bool">true</repeatable>
		<binding>
			<command>nasal</command>
			<script>
				walk.walk_about(0.25);
            </script>
        </binding>
    </key>
	<key n="89">
		<name>Y</name>
		<desc>raise</desc>
		<repeatable type="bool">false</repeatable>
		<binding>
			<command>property-assign</command>
			<property>sim/current-view/raise</property>
			<value>1</value>
        </binding>
		<mod-up>
			<binding>
				<command>property-assign</command>
				<property>sim/current-view/raise</property>
				<value></value>
            </binding>
        </mod-up>
    </key>
	<key n="102">
		<name>f</name>
		<desc>Walk backward from view</desc>
		<repeatable type="bool">true</repeatable>
		<binding>
			<command>nasal</command>
			<script>
				walk.walk_about(-0.1);
            </script>
        </binding>
    </key>
	<key n="121">
		<name>y</name>
		<desc>Crouch</desc>
		<repeatable type="bool">false</repeatable>
		<binding>
			<command>property-assign</command>
			<property>sim/current-view/crouch</property>
			<value>1</value>
        </binding>
		<mod-up>
			<binding>
				<command>property-assign</command>
				<property>sim/current-view/crouch</property>
				<value>0</value>
            </binding>
        </mod-up>
    </key>
	<!-- Tiller steering -->
	<key n="81">
		<name>Q</name>
		<desc>Steer tiller full left</desc>
		<binding>
			<command>nasal</command>
			<script>
				controls.setTiller(-80);
            </script>
			<!--command>property-assign</command>
				<property>controls/gear/tiller-steer-deg</property>
            <value>-80</value-->
        </binding>
    </key>
	<key n="113">
		<name>q</name>
		<desc>Steer tiller left</desc>
		<repeatable type="bool">true</repeatable>
		<binding>
			<command>nasal</command>
			<script>
				controls.stepTiller(-10);
            </script>
			<!--command>property-adjust</command>
				<property>controls/gear/tiller-steer-deg</property>
				<step>-10</step>
            <min>-80</min-->
        </binding>
    </key>
	<key n="119">
		<name>w</name>
		<desc>Center tiller</desc>
		<binding>
			<command>nasal</command>
			<script>
				controls.setTiller(0);
            </script>
			<!--command>property-assign</command>
				<property>controls/gear/tiller-steer-deg</property>
            <value>0</value-->
        </binding>
    </key>
	<key n="101">
		<name>e</name>
		<desc>Steer tiller right</desc>
		<repeatable type="bool">true</repeatable>
		<binding>
			<command>nasal</command>
			<script>
				controls.stepTiller(10);
            </script>
			<!--command>property-adjust</command>
				<property>controls/gear/tiller-steer-deg</property>
				<step>10</step>
            <max>80</max-->
        </binding>
    </key>
	<key n="69">
		<name>E</name>
		<desc>Steer tiller full right</desc>
		<binding>
			<command>nasal</command>
			<script>
				controls.setTiller(80);
            </script>
			<!--command>property-assign</command>
				<property>controls/gear/tiller-steer-deg</property>
            <value>80</value-->
        </binding>
    </key>
	<key n="87">
		<name>W</name>
		<desc>Open tiller dialog</desc>
		<binding>
			<command>nasal</command>
			<script>
				CRJ700.dialogs.tiller.open();
            </script>
        </binding>
    </key>
	<!-- Autopilot -->
	<key n="1">
		<name>Ctrl-A</name>
		<desc>Toggle autopilot altitude mode</desc>
		<binding>
			<command>property-cycle</command>
			<property>controls/autoflight/vert-mode</property>
			<value>1</value>
			<value>0</value>
        </binding>
    </key>
	<key n="6">
		<name>Ctrl-F</name>
		<desc>Engage/disengage autopilot</desc>
		<binding>
			<command>property-toggle</command>
			<property>controls/autoflight/autopilot/engage</property>
        </binding>
    </key>
	<key n="7">
		<name>Ctrl-G</name>
		<desc>Toggle autopilot approach mode</desc>
		<binding>
			<command>property-cycle</command>
			<property>controls/autoflight/lat-mode</property>
			<value>3</value>
			<value>0</value>
        </binding>
    </key>
	<key n="8">
		<name>Ctrl-H</name>
		<desc>Toggle autopilot heading mode</desc>
		<binding>
			<command>property-cycle</command>
			<property>controls/autoflight/lat-mode</property>
			<value>1</value>
			<value>0</value>
        </binding>
    </key>
	<key n="14">
		<name>Ctrl-N</name>
		<desc>Toggle autopilot NAV mode</desc>
		<binding>
			<command>property-cycle</command>
			<property>controls/autoflight/lat-mode</property>
			<value>2</value>
			<value>0</value>
        </binding>
    </key>
	<key n="16">
		<name>Ctrl-P</name>
		<desc>Set autopilot pitch mode</desc>
		<binding>
			<command>property-assign</command>
			<property>controls/autoflight/vert-mode</property>
			<value>0</value>
        </binding>
    </key>
	<key n="19">
		<name>Ctrl-S</name>
		<desc>Engage/disengage autothrottle</desc>
		<binding>
			<command>property-toggle</command>
			<property>controls/autoflight/autothrottle-engage</property>
        </binding>
    </key>
	<key n="20">
		<name>Ctrl-T</name>
		<desc>Flight director TO/GA mode</desc>
		<binding>
			<command>property-assign</command>
			<property>controls/autoflight/toga-button</property>
			<value>1</value>
        </binding>
    </key>
	<key n="23">
		<name>Ctrl-W</name>
		<desc>Set autopilot hold heading/roll mode</desc>
		<binding>
			<command>property-assign</command>
			<property>controls/autoflight/lat-mode</property>
			<value>0</value>
        </binding>
    </key>
	<key n="262">
		<name>F6</name>
		<desc>Cycle NAV source</desc>
		<binding>
			<command>property-cycle</command>
			<property>controls/autoflight/nav-source</property>
			<value>0</value>
			<value>1</value>
			<value>2</value>
        </binding>
    </key>
	<!-- Power plant -->
	<key n="78">
		<name>N</name>
		<desc>Decrement engine thrust modes</desc>
		<binding>
			<command>nasal</command>
			<script>
				controls.incThrustModes(-1);
            </script>
        </binding>
    </key>
	<key n="110">
		<name>n</name>
		<desc>Increment engine thrust modes</desc>
		<binding>
			<command>nasal</command>
			<script>
				controls.incThrustModes(1);
            </script>
        </binding>
    </key>
	<key n="127">
		<name>Delete</name>
		<desc>Toggle thrust reversers or arm/disarm thrust reversers</desc>
		<binding>
			<command>nasal</command>
			<script>
				var ctrl = props.globals.getNode("devices/status/keyboard/ctrl").getBoolValue();
				if (ctrl)
				{
					controls.toggleArmReversers();
                }
				else
				{
					controls.reverseThrust();
                }
            </script>
        </binding>
    </key>
	<!-- GUI -->
	<key n="268">
		<name>F12</name>
		<desc>Pop up radio settings dialog</desc>
		<binding>
			<command>nasal</command>
			<script>
				CRJ700.dialogs.radio.open();
            </script>
        </binding>
    </key>
    <!-- override of default key bindings -->
    <key n="55">
        <name>7</name>
        <desc>Elevator trim up</desc>
        <repeatable type="bool">true</repeatable>
        <binding>
            <command>nasal</command>
            <script>controls.elevatorTrim(1)</script>
        </binding>
    </key>    
    <key n="49">
        <name>1</name>
        <desc>Elevator trim down</desc>
        <repeatable type="bool">true</repeatable>
        <binding>
            <command>nasal</command>
            <script>controls.elevatorTrim(-1)</script>
        </binding>
    </key>

    
    <key n="362">
        <name>Home</name>
        <desc>Increase elevator trim</desc>
        <repeatable type="bool">true</repeatable>
        <binding>
            <command>nasal</command>
            <script>controls.elevatorTrim(1)</script>
        </binding>
        <!--         <mod-shift>
            <desc>Look front left</desc>
            <binding>
            <command>property-assign</command>
            <property>/sim/current-view/goal-heading-offset-deg</property>
            <property>/sim/view/config/front-left-direction-deg</property>
            </binding>
        </mod-shift> -->
    </key>
    
    <key n="363">
        <name>End</name>
        <desc>Decrease elevator trim</desc>
        <repeatable type="bool">true</repeatable>
        <binding>
            <command>nasal</command>
            <script>controls.elevatorTrim(-1)</script>
        </binding>
        <!--         <mod-shift>
            <desc>Look back left</desc>
            <binding>
            <command>property-assign</command>
            <property>/sim/current-view/goal-heading-offset-deg</property>
            <property>/sim/view/config/back-left-direction-deg</property>
            </binding>
        </mod-shift> -->
    </key>
</PropertyList>
