ScreenSpaceEventHandler

external class ScreenSpaceEventHandler(element: HTMLCanvasElement? = definedExternally)(source)

Handles user input events. Custom functions can be added to be executed on when the user enters input.

Parameters

element

The element to add events to. Default value - document

See also

Constructors

Link copied to clipboard
constructor(element: HTMLCanvasElement? = definedExternally)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
sealed interface MotionEvent

An Event that starts at one position and ends at another.

Link copied to clipboard
sealed interface PositionedEvent

An Event that occurs at a single position on screen.

Link copied to clipboard
sealed interface TwoPointEvent

An Event that occurs at a two positions on screen.

Link copied to clipboard
sealed interface TwoPointMotionEvent

An Event that starts at a two positions on screen and moves to two other positions.

Functions

Link copied to clipboard
fun destroy()

Removes listeners held by this object.

Link copied to clipboard
fun getInputAction(type: ScreenSpaceEventType, modifier: KeyboardEventModifier? = definedExternally): Any

Returns the function to be executed on an input event.

Link copied to clipboard

Returns true if this object was destroyed; otherwise, false.

Link copied to clipboard
fun removeInputAction(type: ScreenSpaceEventType, modifier: KeyboardEventModifier? = definedExternally)

Removes the function to be executed on an input event.

Link copied to clipboard
fun setInputAction(action: Any, type: ScreenSpaceEventType, modifier: KeyboardEventModifier? = definedExternally)

Set a function to be executed on an input event.