<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2007 rel. 3 sp1 (http://www.altova.com) by ab (cd) -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
  <xs:element name="Macro">
    <xs:annotation>
      <xs:documentation>This is the root element which describes a DPG Macro.  A macro can consist of a series of events.  Currently there are three types of events defined: a mouse event, a keyboard event and a delay event.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:choice maxOccurs="1024">
          <xs:element name="MouseEvent">
            <xs:complexType>
              <xs:simpleContent>
                <xs:restriction base="MouseEventType">
                  <xs:minInclusive value="0" />
                  <xs:maxInclusive value="5" />
                  <xs:attribute name="Down" type="xs:boolean" />
                </xs:restriction>
              </xs:simpleContent>
            </xs:complexType>
          </xs:element>
          <xs:element name="KeyBoardEvent">
            <xs:complexType>
              <xs:simpleContent>
                <xs:restriction base="KeyboardEventType">
                  <xs:minInclusive value="0" />
                  <xs:maxInclusive value="65535" />
                  <xs:attribute name="Down" type="xs:boolean" />
                </xs:restriction>
              </xs:simpleContent>
            </xs:complexType>
          </xs:element>
          <xs:element name="DelayEvent" type="DelayEventType" />
          <xs:element name="DPIEvent">
            <xs:complexType>
              <xs:simpleContent>
                <xs:restriction base="DPIEventType">
                  <xs:minInclusive value="1" />
                  <xs:maxInclusive value="5" />
                </xs:restriction>
              </xs:simpleContent>
            </xs:complexType>
          </xs:element>
        </xs:choice>
      </xs:sequence>
      <xs:attribute name="Version" type="xs:string" use="optional" default="1.0" />
      <xs:attribute name="RepeatingMode" type="xs:unsignedInt" use="optional" default="0" />
    </xs:complexType>
  </xs:element>
  <xs:complexType name="DPIEventType">
    <xs:annotation>
      <xs:documentation>A mouse event will have an on or off state (like a keyboard event), and the mouse button number which is a positive byte value.  The mouse number can be restricted to a range, if needed.</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="xs:short" />
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="MouseEventType">
    <xs:annotation>
      <xs:documentation>A mouse event will have an on or off state (like a keyboard event), and the mouse button number which is a positive byte value.  The mouse number can be restricted to a range, if needed.</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="xs:unsignedByte">
        <xs:attribute name="Down" type="xs:boolean" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="KeyboardEventType">
    <xs:annotation>
      <xs:documentation>A keyboard event will have an on or off state (like a mouse event), and a keystroke id.  This id is a positive integer, and can be restricted to a certian range or set of values, if needed.</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="xs:unsignedInt">
        <xs:attribute name="Down" type="xs:boolean" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="DelayEventType">
    <xs:annotation>
      <xs:documentation>A delay event is the time delay between keystroke and mouse events.  This is any positive integer value which represents the milliseconds between other events.</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="xs:unsignedLong" />
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="EventType">
    <xs:annotation>
      <xs:documentation>An EventType can consist of eiter a mouse, keyboard, or delay event</xs:documentation>
    </xs:annotation>
  </xs:complexType>
</xs:schema>