Skip to content

isMouseDown

Checks if a mouse button is currently being held down.

Syntax

lua
Ham.isMouseDown(button)

Parameters

NameTypeDescription
buttonintegerMouse button (0 = Left, 1 = Right, 2 = Middle)

Returns

  • boolean - true if the button is down

Example

lua
if Ham.isMouseDown(0) then
    print("Left mouse button is held")
end

See Also

Released under the ISC License.