Returns whether a given mouse button is held down. If no button is specified, returns 1 if any mouse button is held down.


See also Utility functions.

Signature:

isDown = IsMouseButtonDown([button])

Arguments:

  • button - Number or name of a mouse button (number,string)
    • 1 or LeftButton - Primary mouse button
    • 2 or RightButton - Secondary mouse button
    • 3 or MiddleButton - Third mouse button (or clickable scroll control)
    • 4 or Button4 - Fourth mouse button
    • 5 or Button5 - Fifth mouse button

Returns:

  • isDown - 1 if the mouse button is down; otherwise nil (1nil)