computer-mouseinput

Functions for retrieving and setting mouse positions, simulating key presses and mouse clicks, and managing clipboard content.

input get_mouse_position() -> vector2

Returns your 2D mouse position.

input set_mouse_position(vector2) -> void

Sets your mouse position in the coordinate.

input set_mouse_position_rel(vector2) -> void

Moves your mouse position in the coordinate.

input simulate_press(int) -> void

Simulates a key press, takes virtual key codes.

input simulate_press_down(int) -> void

Simulates a key press down, takes virtual key codes.

input simulate_press_up(int) -> void

Simulates a key press up, takes virtual key codes.

  • Use MOUSE1 (Left Mouse Button) MOUSE2 (Right Mouse Button) MOUSE3 (Middle Mouse Button)

input simulate_mouse_up(int) -> void

Simulates mouse up movement.

input simulate_mouse_down(int) -> void

Simulates mouse down movement.

input simulate_mouse_click(int) -> void

Simulates mouse click.

input scroll(int) -> void

Simulates a scroll, example (-120, 120)

input key_down(int) -> bool

Checks if the key is down, takes virtual key codes.

input is_key_pressed(int) -> bool

Returns true once when the key is being held.

input setclipboard(string) -> void

Sets the clipboard with the string

Example

Last updated