lovr.system.isMouseDown

Edit

Returns whether a mouse button is currently pressed.

down = lovr.system.isMouseDown(button)

Arguments

NameTypeDescription
buttonnumber The index of a button to check. Use 1 for the primary mouse button, 2 for the secondary button, and 3 for the middle button. Other indices can be used, but are hardware-specific.

Returns

NameTypeDescription
downboolean Whether the mouse button is currently down.

See also