Class reference
InputEventWithModifiers
Inherits InputEventFromWindow
Abstract base class for input events affected by modifier keys like Shift and Alt.
Description
Stores information about mouse, keyboard, and touch gesture input events. This includes information about which modifier keys are pressed, such as Shift or Alt. See Node._input(). Note: Modifier keys are considered modifiers only when used in combination with another key. As a result, their corresponding member variables, such as ctrl_pressed, will return false if the key is pressed on its own.
Properties
bool alt_pressed = false
bool alt_pressed = falseState of the Alt modifier.
bool command_or_control_autoremap = false
bool command_or_control_autoremap = falseAutomatically use Meta (Cmd) on macOS and Ctrl on other platforms. If true, ctrl_pressed and meta_pressed cannot be set.
bool ctrl_pressed = false
bool ctrl_pressed = falseState of the Ctrl modifier.
bool meta_pressed = false
bool meta_pressed = falseState of the Meta modifier. On Windows and Linux, this represents the Windows key (sometimes called "meta" or "super" on Linux). On macOS, this represents the Command key.
bool shift_pressed = false
bool shift_pressed = falseState of the Shift modifier.