{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/glasswarp-com/json-schema/glasswarp-com-input-event-schema.json",
  "title": "InputEvent",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/glasswarp-com-openapi.yaml#/components/schemas/InputEvent",
  "type": "object",
  "required": [
    "type"
  ],
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "mouse_move",
        "mouse_click",
        "mouse_scroll",
        "key_press",
        "key_down",
        "key_up",
        "type_text"
      ]
    },
    "x": {
      "type": "integer",
      "description": "Absolute X coordinate (for mouse events)"
    },
    "y": {
      "type": "integer",
      "description": "Absolute Y coordinate (for mouse events)"
    },
    "button": {
      "type": "string",
      "enum": [
        "left",
        "right",
        "middle"
      ],
      "description": "Mouse button (for mouse_click)"
    },
    "dx": {
      "type": "integer",
      "description": "Horizontal scroll delta (for mouse_scroll)"
    },
    "dy": {
      "type": "integer",
      "description": "Vertical wheel notches for mouse_scroll (negative = down); mapped to MOUSEEVENTF_WHEEL"
    },
    "key": {
      "type": "string",
      "description": "Key name (for key_press, key_down, key_up)"
    },
    "text": {
      "type": "string",
      "description": "Text to type (for type_text)"
    },
    "delay_ms": {
      "type": "integer",
      "minimum": 0,
      "maximum": 5000,
      "description": "Optional pause after this event before the next (host-side). Useful\nwhen a UI needs settling time between clicks or keystrokes.\n"
    }
  }
}