emulateTouchFromMouseEvent

Emulates touch event from the mouse event parameters.


suspend fun emulateTouchFromMouseEvent(type: String, x: Int, y: Int, button: Input.MouseButton, timestamp: Double? = null, deltaX: Double? = null, deltaY: Double? = null, modifiers: Int? = null, clickCount: Int? = null)

Emulates touch event from the mouse event parameters.

Parameters

type

Type of the mouse event.

x

X coordinate of the mouse pointer in DIP.

y

Y coordinate of the mouse pointer in DIP.

button

Mouse button. Only "none", "left", "right" are supported.

timestamp

Time at which the event occurred (default: current time).

deltaX

X delta in DIP for mouse wheel event (default: 0).

deltaY

Y delta in DIP for mouse wheel event (default: 0).

modifiers

Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).

clickCount

Number of times the mouse button was clicked (default: 0).