Input.emulateTouchFromMouseEventEmulates touch event from the mouse event parameters.
| Name | Type | Description |
|---|---|---|
type | string | Type of the mouse event. |
x | integer | X coordinate of the mouse pointer in DIP. |
y | integer | Y coordinate of the mouse pointer in DIP. |
button | MouseButton | Mouse button. Only "none", "left", "right" are supported. |
timestamp (optional) | TimeSinceEpoch | Time at which the event occurred (default: current time). |
deltaX (optional) | number | X delta in DIP for mouse wheel event (default: 0). |
deltaY (optional) | number | Y delta in DIP for mouse wheel event (default: 0). |
modifiers (optional) | integer | Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0). |
clickCount (optional) | integer | Number of times the mouse button was clicked (default: 0). |
{
"id": 1,
"method": "Input.emulateTouchFromMouseEvent",
"params": {
"type": "type-value",
"x": 100,
"y": 100,
"button": "button-value"
}
}
{
"id": 1,
"result": {}
}
const result = await send('Input.emulateTouchFromMouseEvent', {"type": "type-value", "x": 100, "y": 100, "button": "button-value"});
console.log(result);