.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the InputEvent.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_InputEvent: InputEvent ========== **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` **Inherited By:** :ref:`InputEventScreenTouch`, :ref:`InputEventWithModifiers`, :ref:`InputEventScreenDrag`, :ref:`InputEventJoypadMotion`, :ref:`InputEventJoypadButton`, :ref:`InputEventAction` **Category:** Core Brief Description ----------------- Generic input event Member Functions ---------------- +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`action_match` **(** :ref:`InputEvent` event **)** const | +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`as_text` **(** **)** const | +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_action` **(** :ref:`String` action **)** const | +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_action_pressed` **(** :ref:`String` action **)** const | +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_action_released` **(** :ref:`String` action **)** const | +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_action_type` **(** **)** const | +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_echo` **(** **)** const | +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_pressed` **(** **)** const | +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`shortcut_match` **(** :ref:`InputEvent` event **)** const | +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`InputEvent` | :ref:`xformed_by` **(** :ref:`Transform2D` xform, :ref:`Vector2` local_ofs=Vector2( 0, 0 ) **)** const | +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Member Variables ---------------- .. _class_InputEvent_device: - :ref:`int` **device** - The event's device ID. Description ----------- Base class of all sort of input event. See :ref:`Node._input`. Member Function Description --------------------------- .. _class_InputEvent_action_match: - :ref:`bool` **action_match** **(** :ref:`InputEvent` event **)** const Returns ``true`` if this event matches ``event``. .. _class_InputEvent_as_text: - :ref:`String` **as_text** **(** **)** const Returns a :ref:`String` representation of the event. .. _class_InputEvent_is_action: - :ref:`bool` **is_action** **(** :ref:`String` action **)** const Returns ``true`` if this input event matches a pre-defined action of any type. .. _class_InputEvent_is_action_pressed: - :ref:`bool` **is_action_pressed** **(** :ref:`String` action **)** const Returns ``true`` if the given action is being pressed (and is not an echo event for KEY events). Not relevant for the event types ``MOUSE_MOTION``, ``SCREEN_DRAG`` or ``NONE``. .. _class_InputEvent_is_action_released: - :ref:`bool` **is_action_released** **(** :ref:`String` action **)** const Returns ``true`` if the given action is released (i.e. not pressed). Not relevant for the event types ``MOUSE_MOTION``, ``SCREEN_DRAG`` or ``NONE``. .. _class_InputEvent_is_action_type: - :ref:`bool` **is_action_type** **(** **)** const Returns ``true`` if this input event's type is one of the ``InputEvent`` constants. .. _class_InputEvent_is_echo: - :ref:`bool` **is_echo** **(** **)** const Returns ``true`` if this input event is an echo event (only for events of type KEY). .. _class_InputEvent_is_pressed: - :ref:`bool` **is_pressed** **(** **)** const Returns ``true`` if this input event is pressed. Not relevant for the event types ``MOUSE_MOTION``, ``SCREEN_DRAG`` or ``NONE``. .. _class_InputEvent_shortcut_match: - :ref:`bool` **shortcut_match** **(** :ref:`InputEvent` event **)** const .. _class_InputEvent_xformed_by: - :ref:`InputEvent` **xformed_by** **(** :ref:`Transform2D` xform, :ref:`Vector2` local_ofs=Vector2( 0, 0 ) **)** const