InputEvent

    Inherited By: , InputEventJoypadButton, , InputEventMIDI, , InputEventScreenTouch,

    Category: Core

    Generic input event

    Properties

    Description

    Base class of all sort of input event. See Node._input.

    Property Descriptions

    • device

    The event’s device ID.

    • bool accumulate ( with_event )

    The given input event’s position, global position and speed will be copied. The resulting relative is a sum of both events. Both events’ modifiers have to be identical.


    Returns a representation of the event.


    • float get_action_strength ( action ) const

    Returns a value between 0.0 and 1.0 depending on the given actions’ state. Useful for getting the value of events of type InputEventJoypadMotion.


    Returns true if this input event matches a pre-defined action of any type.


    • is_action_pressed ( String action ) const

    Returns if the given action is being pressed (and is not an echo event for events). Not relevant for events of type InputEventMouseMotion or .


    • bool is_action_released ( action ) const

    • bool is_action_type ( ) const

    Returns true if this input event’s type is one that can be assigned to an input action.


    • is_echo ( ) const

    Returns if this input event is an echo event (only for events of type InputEventKey).


    • is_pressed ( ) const

    Returns true if this input event is pressed. Not relevant for events of type InputEventMouseMotion or .


    • bool shortcut_match ( event ) const

    Returns true if the given input event is checking for the same key (InputEventKey), button () or action (InputEventAction).


    Returns a copy of the given input event which has been offset by and transformed by xform. Relevant for events of type , InputEventMouseMotion, , InputEventScreenDrag, and InputEventPanGesture.