event.isCtrlDown

Type Boolean
Event mouse
Revision Release 2020.3606
Keywords mouse, isCtrlDown

Overview

Indicates if the ctrl 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.isCtrlDown then
        -- The ctrl button is currently pressed down.
    else
        -- The ctrl button is not being pressed.
    end
end
                             
-- Add the mouse event listener.
Runtime:addEventListener( "mouse", onMouseEvent )