<?xml version="1.0" encoding="ISO-8859-1"?>

<PropertyList>

  <keyboard>

    <key n="100">
      <name>d</name>
      <desc>Crew door</desc>
      <binding>
        <command>nasal</command>
        <script>doors.crew.toggle();</script>
      </binding>
    </key>

    <key n="68">
      <name>D</name>
      <desc>Bomber bay</desc>
      <binding>
        <command>nasal</command>
        <script>doors.bomb.toggle();</script>
      </binding>
    </key>

    <key n="119">
      <name>w</name>
      <desc>Wings</desc>
      <binding>
        <condition>
          <and>
            <property>/gear/gear[0]/wow</property>
            <property>/gear/gear[1]/wow</property>
            <property>/gear/gear[2]/wow</property>
            <less-than>
              <property>/gear/gear[0]/rollspeed-ms</property>
              <value>10</value>
            </less-than>
          </and>
        </condition>
        <command>nasal</command>
        <script>doors.wings.toggle();</script>
      </binding>
    </key>

    <key n="5">
      <name>Ctrl-e</name>
      <binding>
        <command>property-assign</command>
        <!-- <property>controls/armament/release-bomb</property> -->
        <property>sim/multiplay/generic/int[11]</property>
        <value>true</value>
      </binding>
    </key>
    <!--
    <key n="114">
      <name>r</name>
      <desc>Masterarm</desc>
      <binding>
        <command>property-toggle</command> -->
        <!-- <property>controls/armament/master-arm</property> -->
        <!-- <property>sim/multiplay/generic/bool[25]</property>
      </binding>
      <binding>
        <command>nasal</command>
        <script>
          screen.log.write("Master-arm "~(getprop("sim/multiplay/generic/bool[25]")==0?"OFF":"ON"), 1.0, 0.2, 0.2);
        </script>
      </binding>
    </key>

    <key n="101">
      <name>e</name>
      <desc>Guns</desc>
      <binding>
        <condition> -->
          <!-- <property>controls/armament/master-arm</property> -->
          <!-- <property>sim/multiplay/generic/bool[25]</property>
        </condition>
        <command>property-assign</command> -->
        <!-- <property>controls/armament/trigger</property>  -->
        <!-- <property>sim/multiplay/generic/int[10]</property>
        <value>true</value>
      </binding>
      <mod-up>
        <binding>
          <command>property-assign</command> -->
          <!-- <property>controls/armament/trigger</property> -->
          <!-- <property>sim/multiplay/generic/int[10]</property>
          <value>false</value>
        </binding>
      </mod-up>
    </key>
     -->
    <!-- Input/Keyboard/Carrier-bindings.xml here for the moment -->
    <!-- map keys for catapult launch -->
    <key n="67">
      <name>C</name>
      <desc>Catapult Launch Command.</desc>
      <binding>
        <command>property-assign</command>
        <property>controls/gear/catapult-launch-cmd</property>
        <value type="bool"> true </value>
      </binding>
      <mod-up>
        <binding>
          <command>property-assign</command>
          <property>controls/gear/catapult-launch-cmd</property>
          <value type="bool"> false </value>
        </binding>
      </mod-up>
    </key>

    <!-- map keys for launch-bar -->
    <key n="76">
      <name>L</name>
      <desc>Launch-bar engage.</desc>
      <binding>
        <command>property-assign</command>
        <property>controls/gear/launchbar</property>
        <value type="bool"> true </value>
      </binding>
      <mod-up>
        <binding>
          <command>property-assign</command>
          <property>controls/gear/launchbar</property>
          <value type="bool"> false </value>
        </binding>
      </mod-up>
    </key>

    <!-- map keys for arrester hook -->
    <key n="79">
      <name>O</name>
      <desc>Hook down</desc>
      <binding>
        <command>property-assign</command>
        <property>controls/gear/tailhook</property>
        <value type="double"> 1 </value>
      </binding>
    </key>

    <key n="111">
      <name>o</name>
      <desc>Hook Up</desc>
      <binding>
        <command>property-assign</command>
        <property>controls/gear/tailhook</property>
        <value type="double"> 0 </value>
      </binding>
    </key>

    <key n="81">
      <name>Q</name>
      <desc>Reset view</desc>
      <binding>
        <command>nasal</command>
        <script>
          setprop("sim/current-view/field-of-view",      getprop("sim/current-view/config/default-field-of-view-deg"));
          setprop("sim/current-view/heading-offset-deg", getprop("sim/current-view/config/heading-offset-deg"));
          setprop("sim/current-view/pitch-offset-deg",   getprop("sim/current-view/config/pitch-offset-deg"));
          setprop("sim/current-view/roll-offset-deg",    getprop("sim/current-view/config/roll-offset-deg"));
        </script>
      </binding>
    </key>

    <key n="125">
      <name>}</name>
      <desc>AutoStart/AutoStart</desc>
      <binding>
        <command>property-toggle</command>
        <property>controls/electric/battery-switch</property>
      </binding>
      <binding>
        <command>property-toggle</command>
        <property>controls/electric/engine/generator</property>
      </binding>
      <binding>
        <command>property-toggle</command>
        <property>controls/lighting/instrument-lights</property>
      </binding>
      <binding>
        <command>property-toggle</command>
        <property>controls/lighting/nav-lights</property>
      </binding>
      <binding>
        <command>property-toggle</command>
        <property>controls/lighting/beacon</property>
      </binding>
      <binding>
        <command>property-toggle</command>
        <property>controls/lighting/strobe</property>
      </binding>
      <binding>
        <command>property-toggle</command>
        <property>controls/switches/starterkey-insert</property>
      </binding>
      <!-- Magnetos ON -->
      <binding>
        <condition>
          <property>controls/switches/starterkey-insert</property>
        </condition>
        <command>property-assign</command>
        <property>controls/engines/engine[0]/magnetos</property>
        <value>3</value>
      </binding>
      <binding>
        <condition>
          <property>controls/switches/starterkey-insert</property>
        </condition>
        <command>property-assign</command>
        <property>controls/engines/engine[1]/magnetos</property>
        <value>3</value>
      </binding>
      <binding>
        <condition>
          <property>controls/switches/starterkey-insert</property>
        </condition>
        <command>property-assign</command>
        <property>consumables/fuel/tank[0]/selected</property>
        <value>true</value>
      </binding>
      <binding>
        <condition>
          <property>controls/switches/starterkey-insert</property>
        </condition>
        <command>property-assign</command>
        <property>consumables/fuel/tank[1]/selected</property>
        <value>true</value>
      </binding>
      <binding>
        <condition>
          <property>controls/switches/starterkey-insert</property>
        </condition>
        <command>property-assign</command>
        <property>consumables/fuel/tank[2]/selected</property>
        <value>true</value>
      </binding>
      <!-- Magnetos OFF -->
      <binding>
        <condition>
          <not><property>controls/switches/starterkey-insert</property></not>
        </condition>
        <command>property-assign</command>
        <property>controls/engines/engine[0]/magnetos</property>
        <value>0</value>
      </binding>
      <binding>
        <condition>
          <not><property>controls/switches/starterkey-insert</property></not>
        </condition>
        <command>property-assign</command>
        <property>controls/engines/engine[1]/magnetos</property>
        <value>0</value>
      </binding>
      <binding>
        <condition>
          <not><property>controls/switches/starterkey-insert</property></not>
        </condition>
        <command>property-assign</command>
        <property>consumables/fuel/tank[0]/selected</property>
        <value>false</value>
      </binding>
      <binding>
        <condition>
          <not><property>controls/switches/starterkey-insert</property></not>
        </condition>
        <command>property-assign</command>
        <property>consumables/fuel/tank[1]/selected</property>
        <value>false</value>
      </binding>
      <binding>
        <condition>
          <not><property>controls/switches/starterkey-insert</property></not>
        </condition>
        <command>property-assign</command>
        <property>consumables/fuel/tank[2]/selected</property>
        <value>false</value>
      </binding>
      <!-- ********************************************** -->
      <binding>
        <command>nasal</command>
        <script>engines.autostart();</script>
      </binding>
    </key>

  </keyboard>

</PropertyList>
