:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/InputEventWithModifiers.xml. .. _class_InputEventWithModifiers: InputEventWithModifiers ======================= **Inherits:** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` **Inherited By:** :ref:`InputEventGesture`, :ref:`InputEventKey`, :ref:`InputEventMouse` Base class for keys events with modifiers. Description ----------- Contains keys events information with modifiers support like :kbd:`Shift` or :kbd:`Alt`. See :ref:`Node._input`. Tutorials --------- - :doc:`InputEvent <../tutorials/inputs/inputevent>` Properties ---------- +-------------------------+--------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`alt_pressed` | ``false`` | +-------------------------+--------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`command_pressed` | ``false`` | +-------------------------+--------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`ctrl_pressed` | ``false`` | +-------------------------+--------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`meta_pressed` | ``false`` | +-------------------------+--------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`shift_pressed` | ``false`` | +-------------------------+--------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`store_command` | ``true`` | +-------------------------+--------------------------------------------------------------------------------+-----------+ Property Descriptions --------------------- .. _class_InputEventWithModifiers_property_alt_pressed: - :ref:`bool` **alt_pressed** +-----------+------------------------+ | *Default* | ``false`` | +-----------+------------------------+ | *Setter* | set_alt_pressed(value) | +-----------+------------------------+ | *Getter* | is_alt_pressed() | +-----------+------------------------+ State of the :kbd:`Alt` modifier. ---- .. _class_InputEventWithModifiers_property_command_pressed: - :ref:`bool` **command_pressed** +-----------+----------------------------+ | *Default* | ``false`` | +-----------+----------------------------+ | *Setter* | set_command_pressed(value) | +-----------+----------------------------+ | *Getter* | is_command_pressed() | +-----------+----------------------------+ State of the :kbd:`Cmd` modifier. ---- .. _class_InputEventWithModifiers_property_ctrl_pressed: - :ref:`bool` **ctrl_pressed** +-----------+-------------------------+ | *Default* | ``false`` | +-----------+-------------------------+ | *Setter* | set_ctrl_pressed(value) | +-----------+-------------------------+ | *Getter* | is_ctrl_pressed() | +-----------+-------------------------+ State of the :kbd:`Ctrl` modifier. ---- .. _class_InputEventWithModifiers_property_meta_pressed: - :ref:`bool` **meta_pressed** +-----------+-------------------------+ | *Default* | ``false`` | +-----------+-------------------------+ | *Setter* | set_meta_pressed(value) | +-----------+-------------------------+ | *Getter* | is_meta_pressed() | +-----------+-------------------------+ State of the :kbd:`Meta` modifier. ---- .. _class_InputEventWithModifiers_property_shift_pressed: - :ref:`bool` **shift_pressed** +-----------+--------------------------+ | *Default* | ``false`` | +-----------+--------------------------+ | *Setter* | set_shift_pressed(value) | +-----------+--------------------------+ | *Getter* | is_shift_pressed() | +-----------+--------------------------+ State of the :kbd:`Shift` modifier. ---- .. _class_InputEventWithModifiers_property_store_command: - :ref:`bool` **store_command** +-----------+--------------------------+ | *Default* | ``true`` | +-----------+--------------------------+ | *Setter* | set_store_command(value) | +-----------+--------------------------+ | *Getter* | is_storing_command() | +-----------+--------------------------+ If ``true``, pressing :kbd:`Cmd` on macOS or :kbd:`Ctrl` on all other platforms will both be serialized as :ref:`command_pressed`. If ``false``, those same keys will be serialized as :ref:`meta_pressed` on macOS and :ref:`ctrl_pressed` on all other platforms. This aids with cross-platform compatibility when developing e.g. on Windows for macOS, or vice-versa. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`