InputDomain

Functions

Link copied to clipboard

Cancels any active dragging in the page.

Link copied to clipboard

Dispatches a drag event into the page.

Link copied to clipboard

Dispatches a key event to the page.

Link copied to clipboard
suspend fun InputDomain.dispatchMouseClick(x: Double, y: Double, clickDurationMillis: Long = 100, button: MouseButton = MouseButton.left)

Simulates a mouse click on the given x and y coordinates. This uses a mousePressed and mouseReleased event in quick succession.

Link copied to clipboard

Dispatches a mouse event to the page.

Link copied to clipboard

Dispatches a touch event to the page.

Link copied to clipboard
Link copied to clipboard

Emitted only when Input.setInterceptDrags is enabled. Use this data with Input.dispatchDragEvent to restore normal drag and drop behavior.

Link copied to clipboard
Link copied to clipboard
fun events(): Flow<InputEvent>

Subscribes to all events related to this domain.

Link copied to clipboard
inline suspend fun imeSetComposition(text: String, selectionStart: Int, selectionEnd: Int, optionalArgs: ImeSetCompositionRequest.Builder.() -> Unit = {}): ImeSetCompositionResponse

This method sets the current candidate text for ime. Use imeCommitComposition to commit the final text. Use imeSetComposition with empty string as text to cancel composition.

Link copied to clipboard

This method emulates inserting text that doesn't come from a key press, for example an emoji keyboard or an IME.

Link copied to clipboard

Ignores input events (useful while auditing page).

Link copied to clipboard

Prevents default drag and drop behavior and instead emits Input.dragIntercepted events. Drag and drop behavior can be directly controlled via Input.dispatchDragEvent.

Link copied to clipboard

Synthesizes a pinch gesture over a time period by issuing appropriate touch events.

Link copied to clipboard

Synthesizes a scroll gesture over a time period by issuing appropriate touch events.

Link copied to clipboard

Synthesizes a tap gesture over a time period by issuing appropriate touch events.