VirtualInput¶
Simulates mouse, keyboard, and pointer input as if it were performed by a real player.
Not implemented yet
This class exists in the current Roblox API but is not implemented in Nova yet. Scripts that reference it will fail at runtime.
Description¶
VirtualInput simulates mouse, keyboard, and pointer input as if it were performed by a real player. It is intended for testing purposes only and can only be obtained by calling UserInputService.CreateVirtualInput().
All input methods throw a runtime error if the simulated input would interact with Roblox's built-in UI (CoreGui), such as the top bar, chat window, or escape menu. This prevents automation tests from accidentally interfering with system UI that players depend on.
Inheritance¶
Object → VirtualInput
Methods¶
| Member | Signature | Summary |
|---|---|---|
SendKey |
VirtualInput:SendKey(isPressed: bool, keyCode: KeyCode, isRepeatedKey: bool = false): null |
Injects a keyboard key press or release event. |
SendMouseButton |
VirtualInput:SendMouseButton(position: Vector2, button: UserInputType, isDown: bool, repeatCount: int = 0): null |
Injects a mouse button press or release event at the specified screen position. |
SendMouseDelta |
VirtualInput:SendMouseDelta(positionDelta: Vector2): null |
Injects a relative mouse movement event. Only works while the player's cursor is locked. |
SendMousePosition |
VirtualInput:SendMousePosition(position: Vector2): null |
Moves the virtual mouse cursor to the specified absolute screen position. |
SendPointerAction |
VirtualInput:SendPointerAction(position: Vector2, pointerAction: Dictionary): null |
Injects a scroll wheel, trackpad pan, or pinch gesture event at the specified screen position. |
SendTextInput |
VirtualInput:SendTextInput(text: string): null |
Injects a text input event as if the specified string was typed on a keyboard. |
Roblox reference: VirtualInput
Generated from Nova's API dump and Roblox creator-docs. Nova-only members come from the engine's reflection metadata.