Type String Event mouse Revision Release 2021.3646 Keywords mouse, type
A string identifying the type of mouse event that is occurring. Can be one of the following values:
"down"— indicates that a mouse button was pressed.
"up"— indicates that a mouse button was released.
"move"— indicates that the mouse is moving on the screen.
"drag"— indicates that the mouse is moving on the screen while a mouse button is pressed.
"scroll"— indicates that mouse is scrolling along either the X or Y axis.
-- Called when a mouse event has been received. local function onMouseEvent( event ) print( "Mouse event type is: " .. event.type ) end -- Add the mouse event listener. Runtime:addEventListener( "mouse", onMouseEvent )