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
input.mouse_right_click(); -- Dot Operator
local input_mouse_location = input["get_mouse_location"](); -- Bracket Operator

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_press(): void

mouse_left_release

Releases the left mouse button.
mouse_left_release(): void

mouse_left_click

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

mouse_right_press

Presses the right mouse button down without releasing it.
mouse_right_press(): void

mouse_right_release

Releases the right mouse button.
mouse_right_release(): void

mouse_right_click

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

mouse_move_relative

Moves the mouse cursor relative to its current position.
mouse_move_relative(number: x, number: y): void
x
number
required
The horizontal distance to move the cursor in pixels.
y
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.
mouse_move_absolute(number: x, number: y): void
x
number
required
The absolute X coordinate on the screen.
y
number
required
The absolute Y coordinate on the screen.

mouse_scroll

Scrolls the mouse wheel by the specified value.
mouse_scroll(number: value): void
value
number
required
The scroll amount. Positive values scroll up, negative values scroll down.

key_press

Presses a keyboard key down without releasing it.
key_press(number: key): void
key
number
required
The virtual key code of the key to press.

key_release

Releases a keyboard key.
key_release(number: key): void
key
number
required
The virtual key code of the key to release.

key_click

Performs a full keyboard key click (press and release).
key_click(number: key): void
key
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.
get_mouse_location(): Vector2
I