event.type

Type String
Event mouse
Revision Release 2024.3703
Keywords mouse, type

Overview

A string identifying the type of mouse event that is occurring. Can be one of the following values:

Example

-- 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 )