TestInput
Simulates keyboard, pointer, and text input for place tests.
Behavior
TestInput simulates keyboard, pointer, and text input for place tests.
Summary
The runtime type name.
The keys currently held by this simulated input source.
Simulates a mouse-button click and reports whether it was accepted.
Simulates pressing a mouse button.
Simulates releasing a mouse button.
Sets the simulated pointer position and optional movement delta.
Simulates pressing a key specified by an Enum.KeyCode or key name.
Simulates releasing a key.
ReleaseAll(): ()Releases all held simulated keys and buttons.
Scroll(amount: number): ()Simulates mouse-wheel movement.
Simulates a key press followed by release.
Type(text: string): ()Simulates entering the supplied text.
Properties
ClassName
TestInput.ClassName: stringThe runtime type name.
KeysDown
TestInput.KeysDown: tableThe keys currently held by this simulated input source.
Methods
Click
TestInput:Click(button: (EnumItem | number)?): booleanSimulates a mouse-button click and reports whether it was accepted.
MouseDown
TestInput:MouseDown(button: (EnumItem | number)?): booleanSimulates pressing a mouse button.
MouseUp
TestInput:MouseUp(button: (EnumItem | number)?): booleanSimulates releasing a mouse button.
Move
Sets the simulated pointer position and optional movement delta.
Press
TestInput:Press(key: EnumItem | string): booleanSimulates pressing a key specified by an Enum.KeyCode or key name.
Release
TestInput:Release(key: EnumItem | string): booleanSimulates 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): booleanSimulates a key press followed by release.
Type
TestInput:Type(text: string): ()Simulates entering the supplied text.
Operators
__tostring · __type