Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

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

bool

alt_pressed

false

bool

command_or_control_autoremap

false

bool

ctrl_pressed

false

bool

meta_pressed

false

bool

shift_pressed

false

Methods

BitField<KeyModifierMask>

get_modifiers_mask ( ) const

bool

is_command_or_control_pressed ( ) const


Property Descriptions

bool alt_pressed = false

  • void set_alt_pressed ( bool value )

  • bool is_alt_pressed ( )

State of the Alt modifier.


bool command_or_control_autoremap = false

  • void set_command_or_control_autoremap ( bool value )

  • bool is_command_or_control_autoremap ( )

Automatically use Meta (Cmd) on macOS and Ctrl on other