Get the hardware mouse connection state (:is_connected)
This method is available in versions after 20260805
Declaration
connected = mouse_obj:is_connected()
Returns
- connected
Boolean.
truewhile the hardware mouse remains connected; otherwisefalse.
Description
Get the current connection state of the hardware mouse object.
Example
local m = assert(mouse.connect())
assert(m:is_connected())
assert(m:disconnect())
assert(not m:is_connected())