Input.emulateTouchFromMouseEvent

Emulates touch event from the mouse event parameters.

{
  "name": "emulateTouchFromMouseEvent",
  "experimental": true,
  "parameters": [
    {
      "name": "type",
      "type": "string",
      "enum": [
        "mousePressed",
        "mouseReleased",
        "mouseMoved",
        "mouseWheel"
      ],
      "description": "Type of the mouse event."
    },
    {
      "name": "x",
      "type": "integer",
      "description": "X coordinate of the mouse pointer in DIP."
    },
    {
      "name": "y",
      "type": "integer",
      "description": "Y coordinate of the mouse pointer in DIP."
    },
    {
      "name": "timestamp",
      "type": "number",
      "description": "Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970."
    },
    {
      "name": "button",
      "type": "string",
      "enum": [
        "none",
        "left",
        "middle",
        "right"
      ],
      "description": "Mouse button."
    },
    {
      "name": "deltaX",
      "type": "number",
      "optional": true,
      "description": "X delta in DIP for mouse wheel event (default: 0)."
    },
    {
      "name": "deltaY",
      "type": "number",
      "optional": true,
      "description": "Y delta in DIP for mouse wheel event (default: 0)."
    },
    {
      "name": "modifiers",
      "type": "integer",
      "optional": true,
      "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0)."
    },
    {
      "name": "clickCount",
      "type": "integer",
      "optional": true,
      "description": "Number of times the mouse button was clicked (default: 0)."
    }
  ],
  "description": "Emulates touch event from the mouse event parameters.",
  "handlers": [
    "browser"
  ]
}