event.isShiftDown

Type Boolean
Event mouse
Revision Release 2024.3703
Keywords mouse, isShiftDown

Overview

Indicates if the shift button was held down at the time the mouse event occurred.

Example

-- Called when a mouse event has been received.
local function onMouseEvent( event )
    if event.isShiftDown then
        -- The shift button is currently pressed down.
    else
        -- The shift button is not being pressed.
    end
end
                             
-- Add the mouse event listener.
Runtime:addEventListener( "mouse", onMouseEvent )