Open Asterune
TestInput

TestInput

Simulates keyboard, pointer, and text input for place tests.

Behavior

TestInput simulates keyboard, pointer, and text input for place tests.

Summary

Members12
Properties2
Methods10

Properties

ClassName

TestInput.ClassName: string

The runtime type name.

KeysDown

TestInput.KeysDown: table

The keys currently held by this simulated input source.

Methods

Click

TestInput:Click(button: (EnumItem | number)?): boolean

Simulates a mouse-button click and reports whether it was accepted.

MouseDown

TestInput:MouseDown(button: (EnumItem | number)?): boolean

Simulates pressing a mouse button.

MouseUp

TestInput:MouseUp(button: (EnumItem | number)?): boolean

Simulates releasing a mouse button.

Move

TestInput:Move(position: Vector2, delta: Vector2?): ()

Sets the simulated pointer position and optional movement delta.

Press

TestInput:Press(key: EnumItem | string): boolean

Simulates pressing a key specified by an Enum.KeyCode or key name.

Release

TestInput:Release(key: EnumItem | string): boolean

Simulates releasing a key.

ReleaseAll

TestInput:ReleaseAll(): ()

Releases all held simulated keys and buttons.

Scroll

TestInput:Scroll(amount: number): ()

Simulates mouse-wheel movement.

Tap

TestInput:Tap(key: EnumItem | string): boolean

Simulates a key press followed by release.

Type

TestInput:Type(text: string): ()

Simulates entering the supplied text.

Operators

__tostring · __type

Used by

TestService