Skip to content

InputEventAction

Eduard Gushchin edited this page Jul 1, 2026 · 5 revisions

Home | API by Category | Complete API Index | API Compatibility

Field Value
Full name Electron2D.InputEventAction
Namespace Electron2D
Kind class
Category Input

Overview

Represents a direct action input event.

Syntax

public class Electron2D.InputEventAction : Electron2D.InputEvent

Godot 4.7 C# profile compatibility

Profile: Electron2D 0.1.0 2D
Status: Partial / Not verified
Out of profile: yes
Godot reference: InputEventAction

Direct action input event with action name, pressed state and strength for tests, tooling and automation.

Remarks

Direct action events are useful for tests, tools and future automation layers that need to submit action-level input without synthesizing a keyboard or mouse event.

The event is resolved through Electron2D.InputMap by comparing Electron2D.InputEventAction.Action to the requested action name and applying the action's configured deadzone to Electron2D.InputEventAction.Strength.

Thread Safety

Instances are mutable and are not synchronized; use them from the input dispatch thread that owns the event.

Since

This class is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Input
  • Electron2D.InputMap

Members

Member Kind Summary
Action Property Gets or sets the action name carried by this event.
Pressed Property Gets or sets whether this event presses the action.
Strength Property Gets or sets the action strength.
Electron2D.InputEventAction() Constructor Initializes a new instance of the InputEventAction type.

Member Details

Action

Kind: Property

public System.String Action { get; set; }

Summary

Gets or sets the action name carried by this event.

Remarks

Assigning null stores an empty action name. Empty action names do not match registered actions.

Value

The current action value.

Thread Safety

This property is not synchronized.

Since

This property is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.InputEventAction

Pressed

Kind: Property

public System.Boolean Pressed { get; set; }

Summary

Gets or sets whether this event presses the action.

Remarks

When this property is false, the action strength is treated as zero regardless of Electron2D.InputEventAction.Strength.

Value

The current pressed value.

Thread Safety

This property is not synchronized.

Since

This property is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.InputEventAction

Strength

Kind: Property

public System.Single Strength { get; set; }

Summary

Gets or sets the action strength.

Remarks

Values are clamped to the range 0.0 through 1.0. Electron2D.InputMap.EventIsAction(Electron2D.InputEvent,System.String,System.Boolean) and Electron2D.Input.GetActionStrength(System.String,System.Boolean) apply the action deadzone before treating the action as pressed.

Value

The current strength value.

Thread Safety

This property is not synchronized.

Since

This property is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.InputEventAction

Electron2D.InputEventAction()

Kind: Constructor

public Electron2D.InputEventAction()

Summary

Initializes a new instance of the InputEventAction type.

Remarks

The new instance follows the lifetime and validation rules of its declaring type.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.InputEventAction

Clone this wiki locally