The mouse library provides actions for simulating mouse input. Refer to the buttons list.
local ms = libs.mouse;Performs a single click (default left button).
ms.click();
ms.click("right");Moves the mouse cursor to the specified location (screen coordinates).
ms.moveto(100, 200);Moves the mouse cursor by the specified amount (screen coordinates).
ms.moveby(50, -50);Moves the mouse cursor by the specified amount (raw input).
ms.moveraw(-10, 5);Performs a double click (default left button).
ms.double();
ms.double("right");Presses the mouse button until mouse.up is called (default left button).
ms.down();
ms.down("right");Releases the mouse button (default left button).
ms.up();
ms.up("right");Scroll vertically by the specified amount.
ms.vscroll(10);
ms.vscroll(-10);Scroll horizontally by the specified amount.
ms.hscroll(10);
ms.hscroll(-10);Returns the current position of the mouse cursor.
x,y = ms.position();