MouseInjectionScope

sealed interface MouseInjectionScope

Records mouse input at positions in the matched component's coordinates.

Properties

Link copied to clipboard
abstract val center: Point

The middle of the matched component.

Functions

Link copied to clipboard
fun MouseInjectionScope.click(position: Point = center, button: Int = MouseEvent.BUTTON1)

Clicks at position with button.

Link copied to clipboard
fun MouseInjectionScope.contextClick(position: Point = center)

Clicks the secondary button at position.

Link copied to clipboard
abstract fun moveTo(position: Point)

Moves the pointer, dragging when a button is held.

Link copied to clipboard
abstract fun press(button: Int = MouseEvent.BUTTON1)

Presses a button at the current pointer position.

Link copied to clipboard
abstract fun release(button: Int = MouseEvent.BUTTON1)

Releases a held button and clicks if the pointer has not moved.

Link copied to clipboard
abstract fun scroll(rotation: Int)

Turns the wheel at the current pointer position.