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

Beagle Pup Keyboard Shortcuts

Copyright (c) 2015 Richard Senior

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

**************************************************************************
-->

<PropertyList>

  <key n="1">
    <name>Ctrl-a</name>
    <desc>Toggle altitude hold</desc>
    <binding>
      <command>nasal</command>
      <script>
        setprop("autopilot/sperry/alt-hold-button", 1);
        var t = maketimer(0.1, func {
            setprop("autopilot/sperry/alt-hold-button", 0);
        });
        t.singleShot = 1;
        t.start();
        pup.click();
      </script>
    </binding>
  </key>
  <key n="26">
    <name>Ctrl-z</name>
    <desc>Toggle autopilot on/off</desc>
    <binding>
      <command>property-toggle</command>
      <property>autopilot/sperry/main-switch</property>
    </binding>
    <binding>
      <command>nasal</command>
      <script>pup.click();</script>
    </binding>
  </key>
  <key n="70">
    <name>F</name>
    <desc>Full Power</desc>
    <binding>
      <command>nasal</command>
      <script>interpolate("controls/engines/engine/throttle", 1.00, 2.0);</script>
    </binding>
  </key>
  <key n="98">
    <name>b</name>
    <desc>Select Both Tanks</desc>
    <mod-alt>
      <binding>
        <command>nasal</command>
        <script>pup.select_fuel_tank(pup.Tank.BOTH);</script>
      </binding>
    </mod-alt>
  </key>
  <key n="108">
    <name>l</name>
    <desc>Select Left Tank</desc>
    <mod-alt>
      <binding>
        <command>nasal</command>
        <script>pup.select_fuel_tank(pup.Tank.LEFT);</script>
      </binding>
    </mod-alt>
  </key>
  <key n="114">
    <name>r</name>
    <desc>Select Right Tank</desc>
    <mod-alt>
      <binding>
        <command>nasal</command>
        <script>pup.select_fuel_tank(pup.Tank.RIGHT);</script>
      </binding>
    </mod-alt>
  </key>
  <key n="76">
    <name>L</name>
    <desc>After Landing Checklist</desc>
    <binding>
      <command>nasal</command>
      <script>
        if (props.globals.getNode("sim/checklists/auto") == nil) {
        setprop("sim/messages/copilot",
        "Automated checklists need FGDATA 3.5 or higher"
        );
        return;
        }
        generic.complete_checklists("after-landing", 0);
      </script>
    </binding>
  </key>
  <key n="82">
    <name>R</name>
    <desc>Before Takeoff Checklist</desc>
    <binding>
      <command>nasal</command>
      <script>
        if (props.globals.getNode("sim/checklists/auto") == nil) {
        setprop("sim/messages/copilot",
        "Automated checklists need FGDATA 3.5 or higher"
        );
        return;
        }
        generic.complete_checklists("before-takeoff", 0);
      </script>
    </binding>
  </key>

</PropertyList>
