InputEventWithModifiers ​
Inherits: InputEventFromWindow < InputEvent < Resource < RefCounted < Object
Inherited By: InputEventGesture, InputEventKey, InputEventMouse
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.
Tutorials
Properties
false | ||
false | ||
false | ||
false | ||
false |
Methods
BitField[KeyModifierMask] | get_modifiers_mask() const |
is_command_or_control_pressed() const |
Property Descriptions
State of the Alt
modifier.
bool command_or_control_autoremap = false 🔗
Automatically use Meta
(Cmd
) on macOS and Ctrl
on other platforms. If true
, ctrl_pressed and meta_pressed cannot be set.
bool ctrl_pressed = false 🔗
State of the Ctrl
modifier.
bool meta_pressed = false 🔗
State 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 🔗
State of the Shift
modifier.
Method Descriptions
BitField[KeyModifierMask] get_modifiers_mask() const 🔗
Returns the keycode combination of modifier keys.
bool is_command_or_control_pressed() const 🔗
On macOS, returns true
if Meta
(Cmd
) is pressed.
On other platforms, returns true
if Ctrl
is pressed.