Access
All input C++ functions are exposed to your Lua script via a single global table namedinput
. 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 globalinput
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.The horizontal distance to move the cursor in pixels.
The vertical distance to move the cursor in pixels.
mouse_move_absolute
Moves the mouse cursor to an absolute position on the screen.The absolute X coordinate on the screen.
The absolute Y coordinate on the screen.
mouse_scroll
Scrolls the mouse wheel by the specified value.The scroll amount. Positive values scroll up, negative values scroll down.
key_press
Presses a keyboard key down without releasing it.The virtual key code of the key to press.
key_release
Releases a keyboard key.The virtual key code of the key to release.
key_click
Performs a full keyboard key click (press and release).The virtual key code of the key to click.