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

<PropertyList>

  <keyboard>

    <key n="100">
      <name>d</name>
      <desc>Crew door</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.crew.toggle();</script>
      </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[24]</property>
      </binding>
      <binding>
        <command>nasal</command>
        <script>
          screen.log.write("Master-arm "~(getprop("sim/multiplay/generic/bool[24]")==0?"OFF":"ON"), 1.0, 0.2, 0.2);
        </script>
      </binding>
    </key>

    <key n="83">
      <name>S</name>
      <desc>Start/Stop smoke</desc>
      <binding>
        <condition>
          <!-- <property>sim/model/show-smoketanks</property> -->
          <property>sim/multiplay/generic/bool[2]</property>
        </condition>
        <command>property-toggle</command>
        <!-- <property>smoke/active</property> -->
        <property>sim/multiplay/generic/bool[10]</property>
      </binding>
    </key>

    <key n="108">
      <name>l</name>
      <desc>Landing light</desc>
      <binding>
        <command>property-toggle</command>
        <!-- <property>controls/lighting/landing-lights</property> -->
        <property>sim/multiplay/generic/bool[16]</property>
      </binding>
    </key>

    <key n="101">
      <name>e left bomb / Guns pod</name>
      <!-- Air / Ground bomb -->
      <binding>
        <condition>
          <!-- <property>controls/armament/master-arm</property> -->
          <property>sim/multiplay/generic/bool[24]</property>
          <!-- <property>sim/model/show-GA/G</property> -->
          <property>sim/multiplay/generic/bool[6]</property>
        </condition>
        <command>property-assign</command>
        <!-- <property>controls/armament/trigger1</property> -->
        <property>sim/multiplay/generic/int[10]</property>
        <value type="bool">true</value>
      </binding>
      <binding>
        <condition>
          <!-- <property>controls/armament/master-arm</property> -->
          <property>sim/multiplay/generic/bool[24]</property>
          <!-- <property>sim/model/show-GA/G</property> -->
          <property>sim/multiplay/generic/bool[6]</property>
        </condition>
        <command>nasal</command>
        <script>
          setprop("sim/weight[6]/name", getprop("sim/weight[6]/opt[0]/name"));
          setprop("sim/weight[6]/selected", getprop("sim/weight[6]/opt[0]/name"));
          setprop("sim/weight[6]/weight-lb", getprop("sim/weight[6]/opt[0]/lbs"));
        </script>
      </binding>
      <!-- Guns pod -->
      <binding>
        <condition>
          <!-- <property>controls/armament/master-arm</property> -->
          <property>sim/multiplay/generic/bool[24]</property>
          <!-- <property>sim/model/show-gunpod</property> -->
          <property>sim/multiplay/generic/bool[23]</property>
        </condition>
        <command>property-assign</command>
        <!-- <property>controls/armament/trigger5</property> -->
        <property>sim/multiplay/generic/int[14]</property>
        <value type="bool">true</value>
      </binding>
      <mod-up>
        <binding>
          <condition>
            <!-- <property>controls/armament/master-arm</property> -->
            <property>sim/multiplay/generic/bool[24]</property>
            <!-- <property>sim/model/show-gunpod</property> -->
            <property>sim/multiplay/generic/bool[23]</property>
          </condition>
          <command>property-assign</command>
          <!-- <property>controls/armament/trigger5</property> -->
          <property>sim/multiplay/generic/int[14]</property>
          <value type="bool">false</value>
        </binding>
      </mod-up>
    </key>

    <key n="69">
      <name>E right bomb</name>
      <binding>
        <condition>
          <!-- <property>controls/armament/master-arm</property> -->
          <property>sim/multiplay/generic/bool[24]</property>
          <!-- <property>sim/model/show-GA/G</property> -->
          <property>sim/multiplay/generic/bool[6]</property>
        </condition>
        <command>property-assign</command>
        <!-- <property>controls/armament/trigger2</property> -->
        <property>sim/multiplay/generic/int[11]</property>
        <value>true</value>
      </binding>
      <binding>
        <condition>
          <!-- <property>controls/armament/master-arm</property> -->
          <property>sim/multiplay/generic/bool[24]</property>
          <!-- <property>sim/model/show-GA/G</property> -->
          <property>sim/multiplay/generic/bool[6]</property>
        </condition>
        <command>nasal</command>
        <script>
          setprop("sim/weight[7]/name", getprop("sim/weight[7]/opt[0]/name"));
          setprop("sim/weight[7]/selected", getprop("sim/weight[7]/opt[0]/name"));
          setprop("sim/weight[7]/weight-lb", getprop("sim/weight[7]/opt[0]/lbs"));
        </script>
      </binding>
    </key>

    <key n="102">
      <name>f left AIM</name>
      <binding>
        <condition>
          <!-- <property>controls/armament/master-arm</property> -->
          <property>sim/multiplay/generic/bool[24]</property>
          <!-- <property>sim/model/show-GA/A</property> -->
          <property>sim/multiplay/generic/bool[7]</property>
        </condition>
        <command>property-assign</command>
        <!-- <property>controls/armament/trigger3</property> -->
        <property>sim/multiplay/generic/int[12]</property>
        <value>true</value>
      </binding>
      <binding>
        <condition>
          <!-- <property>controls/armament/master-arm</property> -->
          <property>sim/multiplay/generic/bool[24]</property>
          <!-- <property>sim/model/show-GA/A</property> -->
          <property>sim/multiplay/generic/bool[7]</property>
        </condition>
        <command>nasal</command>
        <script>
          setprop("sim/weight[4]/name", getprop("sim/weight[4]/opt[0]/name"));
          setprop("sim/weight[4]/selected", getprop("sim/weight[4]/opt[0]/name"));
          setprop("sim/weight[4]/weight-lb", getprop("sim/weight[4]/opt[0]/lbs"));
        </script>
      </binding>
    </key>

    <key n="70">
      <name>E right AIM</name>
      <binding>
        <condition>
          <!-- <property>controls/armament/master-arm</property> -->
          <property>sim/multiplay/generic/bool[24]</property>
          <!-- <property>sim/model/show-GA/A</property> -->
          <property>sim/multiplay/generic/bool[7]</property>
        </condition>
        <command>property-assign</command>
        <!-- <property>controls/armament/trigger4</property> -->
        <property>sim/multiplay/generic/int[13]</property>
        <value>true</value>
      </binding>
      <binding>
        <condition>
          <!-- <property>controls/armament/master-arm</property> -->
          <property>sim/multiplay/generic/bool[24]</property>
          <!-- <property>sim/model/show-GA/A</property> -->
          <property>sim/multiplay/generic/bool[7]</property>
        </condition>
        <command>nasal</command>
        <script>
          setprop("sim/weight[5]/name", getprop("sim/weight[5]/opt[0]/name"));
          setprop("sim/weight[5]/selected", getprop("sim/weight[5]/opt[0]/name"));
          setprop("sim/weight[5]/weight-lb", getprop("sim/weight[5]/opt[0]/lbs"));
        </script>
      </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</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>
      <binding>
        <command>property-toggle</command>
        <property>controls/engines/engine[0]/fuel-pump</property>
      </binding>
      <binding>
        <command>property-toggle</command>
        <property>controls/engines/engine[1]/fuel-pump</property>
      </binding>
      <binding>
        <command>property-toggle</command>
        <property>/consumables/fuel/tank[0]/selected</property>
      </binding>
      <binding>
        <command>property-toggle</command>
        <property>/consumables/fuel/tank[1]/selected</property>
      </binding>
      <binding>
        <command>property-toggle</command>
        <property>/consumables/fuel/tank[2]/selected</property>
      </binding>
      <binding>
        <command>property-toggle</command>
        <property>/consumables/fuel/tank[3]/selected</property>
      </binding>
      <binding>
        <command>property-toggle</command>
        <property>/consumables/fuel/tank[4]/selected</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>
      <!-- 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>
        <command>nasal</command>
        <script>engines.autostart();</script>
      </binding>
    </key>

  </keyboard>

</PropertyList>
