InputEventWithModifiers

Inherits: InputEventFromWindow < InputEvent < Resource < RefCounted < Object

Inherited By: InputEventGesture, InputEventKey, InputEventMouse

Base class for keys events with modifiers.

Description

Contains keys events information with modifiers support like Shift or Alt. See Node._input.

Tutorials

Property Descriptions

Default

false

Setter

set_alt_pressed(value)

Getter

is_alt_pressed()

State of the Alt modifier.


  • bool command_pressed

Default

false

Setter

set_command_pressed(value)

Getter

is_command_pressed()

State of the Cmd modifier.


Default

false

Setter

set_ctrl_pressed(value)

Getter

is_ctrl_pressed()

State of the Ctrl modifier.


Default

false

Setter

set_meta_pressed(value)

Getter

is_meta_pressed()

State of the Meta modifier.


  • bool shift_pressed

Default

false

Setter

set_shift_pressed(value)

Getter

is_shift_pressed()

State of the Shift modifier.


  • bool store_command

Default

true

Setter

set_store_command(value)

Getter

is_storing_command()

If true, pressing Cmd on macOS or Ctrl on all other platforms will both be serialized as command_pressed. If false, those same keys will be serialized as meta_pressed on macOS and ctrl_pressed on all other platforms.

This aids with cross-platform compatibility when developing e.g. on Windows for macOS, or vice-versa.