- mouse.pressed()
- mouse.released()
- mouse.isDown()
- mouse.press()
- mouse.hold()
- mouse.release()
- mouse.move()
- mouse.wheelMove()
- mouse.setPosition()
- mouse.getPosition()
- mouse.getConsolePosition()
- mouse.virtualPress()
- mouse.virtualHold()
- mouse.virtualRelease()
- mouse.virtualMove()
- mouse.virtualWheelMove()
- mouse.setVirtualPosition()
- mouse.getVirtualPosition()
- mouse.setHookCallback()
Returns
Returns
Returns
Attempts to send a synthetic press (click) for the given key. If 'async' is
Attempts to send a synthetic hold for the given button. As there is no automatically-paired release, the async flag is not accepted in this function. The hold will remain until mouse.release() is called on this same button.
Attempts to send a synthetic release for the given button. You should typically use mouse.hold() on the button first to give it something to release.
Attempts to move (not set to a position) the physical mouse cursor. 'dx' and 'dy' are the amount to move in pixels in the x and y axis, respectively.
Attempts to move the physical mouse wheel. 'delta' specified the amount to move; 120 = 1 wheel click. If 'delta' is positive, moves the wheel up (away from user). If 'delta' is negative, moves the wheel down (towards user).
Attempts to set the physical mouse cursor to the given coordinates. 'x' and 'y' are specified in pixels.
Returns the current position of the physical mouse cursor, in pixels.
Returns the position of the physical mouse cursor in console characters, not pixels.
NOTE: This returns the position inside the console window, not globally. Therefor, if the mouse cursor is to the left or above the console window, you can receive negative numbers. Likewise, if the cursor is to the right or below the console window, you can receive numbers larger than the console width/height in characters.
By default in Windows, a console window is typically 80 characters wide and 25 characters high, with a buffer (the total scrollable area) that is 300 characters high.
Attempts to send a synthetic press for the given button, and sends that input directly to the
given window. If 'async' is
The position that the mouse is "clicked" is wherever the virtual mouse is positioned to (use mouse.virtualMove() or mouse.setVirtualPosition() first).
As virtual functions send the input directly to the specified window's input queue, this can be used to control windows that are in the background without interrupting the user.
Attempts to send a synthetic hold for the given button, and sends that input directly to the given window.
The position that the button is held is wherever the virtual mouse is currently positioned.
Attempts to send a synthetic release for the given button, and sends that input directly to the given window.
The position that the button is released is wherever the virtual mouse is currently positioned.
Moves the virtual mouse cursor by dx, dy. This does not affect the physical mouse cursor. See mouse.move() for more details.
Moves the virtual mouse wheel by 'delta'. See mouse.wheelMove() for more details.
Sets the virtual mouse cursor to (x, y). This does not affect the physical mouse cursor. See mouse.setPosition() for more details.
Returns the position of the virtual mouse cursor. See mouse.getPosition() for more details.
Install or uninstall a mouse hook callback. If 'callback' is a Lua
Moving the mouse will return the virtual key code (
Your callback should return a
If 'callback' is
Both your callback and main function (
When script execution is finished, the hook will also be removed automatically.
Page last updated at 2018-09-25 20:48:11