Skip to main content

Access

All input C++ functions are exposed to your Lua script via a single global table named input. You access individual values by using the dot (.) or bracket ([]) operator on this table.
Input Usage Example

Functions

This section lists all available C++ functions exposed within the global input table. These functions are used to simulate and manage system-level interactions, including mouse movement, button clicks, and keyboard key presses.

mouse_left_press

Presses the left mouse button down without releasing it.

mouse_left_release

Releases the left mouse button.

mouse_left_click

Performs a full left mouse button click (press and release).

mouse_right_press

Presses the right mouse button down without releasing it.

mouse_right_release

Releases the right mouse button.

mouse_right_click

Performs a full right mouse button click (press and release).

mouse_move_relative

Moves the mouse cursor relative to its current position.
number
required
The horizontal distance to move the cursor in pixels.
number
required
The vertical distance to move the cursor in pixels.

mouse_move_absolute

Moves the mouse cursor to an absolute position on the screen.
number
required
The absolute X coordinate on the screen.
number
required
The absolute Y coordinate on the screen.

mouse_scroll

Scrolls the mouse wheel by the specified value.
number
required
The scroll amount. Positive values scroll up, negative values scroll down.

key_press

Presses a keyboard key down without releasing it.
number
required
The virtual key code of the key to press.

key_release

Releases a keyboard key.
number
required
The virtual key code of the key to release.

key_click

Performs a full keyboard key click (press and release).
number
required
The virtual key code of the key to click.

get_mouse_location

Gets the current mouse cursor position on the screen. Returns a Vector2 containing the X and Y coordinates.