{
  "type": "array",
  "maxItems": 8192,
  "items": {
    "oneOf": [
      {
        "type": "object",
        "required": [
          "frame",
          "type"
        ],
        "additionalProperties": false,
        "properties": {
          "frame": {
            "type": "integer",
            "minimum": 0,
            "maximum": 71999
          },
          "type": {
            "const": "pointer"
          },
          "x": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "y": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "dx": {
            "type": "number",
            "minimum": -1000000,
            "maximum": 1000000
          },
          "dy": {
            "type": "number",
            "minimum": -1000000,
            "maximum": 1000000
          },
          "wheel": {
            "type": "number",
            "minimum": -1000000,
            "maximum": 1000000
          }
        }
      },
      {
        "type": "object",
        "required": [
          "frame",
          "code",
          "pressed"
        ],
        "additionalProperties": false,
        "properties": {
          "frame": {
            "type": "integer",
            "minimum": 0,
            "maximum": 71999
          },
          "type": {
            "const": "input"
          },
          "code": {
            "type": "string",
            "pattern": "^(Key[A-Z]|Digit[0-9]|Arrow(Up|Down|Left|Right)|Space|ShiftLeft|ShiftRight|ControlLeft|ControlRight|Mouse[0-4])$"
          },
          "pressed": {
            "type": "boolean"
          }
        }
      },
      {
        "type": "object",
        "required": [
          "frame",
          "type"
        ],
        "additionalProperties": false,
        "properties": {
          "frame": {
            "type": "integer",
            "minimum": 0,
            "maximum": 71999
          },
          "type": {
            "const": "clear"
          }
        }
      },
      {
        "type": "object",
        "required": [
          "frame",
          "type",
          "name"
        ],
        "additionalProperties": false,
        "properties": {
          "frame": {
            "type": "integer",
            "minimum": 0,
            "maximum": 71999
          },
          "type": {
            "enum": [
              "event",
              "widget"
            ]
          },
          "name": {
            "type": "string",
            "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$"
          },
          "value": {}
        }
      }
    ]
  }
}