Skip to content

InputEventKey

Eduard Gushchin edited this page Jun 21, 2026 · 5 revisions

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

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

Overview

Represents a keyboard key press, release, echo, or text input scalar value.

Syntax

public class Electron2D.InputEventKey : Electron2D.InputEventWithModifiers

Remarks

Platform key down/up events fill Electron2D.InputEventKey.Keycode, Electron2D.InputEventKey.PhysicalKeycode, Electron2D.InputEventKey.KeyLabel, Electron2D.InputEventKey.Pressed and Electron2D.InputEventKey.Echo. Platform text input events are represented as one or more key events with Electron2D.InputEventKey.Unicode set and the keycode fields left as Electron2D.Key.None.

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

Thread Safety

Instances of this type are not synchronized. Access them from the thread that owns the object unless the member documentation states otherwise.

Since

This class is available since Electron2D 0.1.0 Preview.

Members

Member Kind Summary
Echo Property Gets or sets whether this event is an echo repeat while the key is held.
KeyLabel Property Gets or sets the localized key label.
Keycode Property Gets or sets the layout key code.
Location Property Gets or sets the left/right key location for modifier keys.
PhysicalKeycode Property Gets or sets the physical key code on a US QWERTY keyboard layout.
Pressed Property Gets or sets whether the key is pressed.
Unicode Property Gets or sets the Unicode scalar value produced by platform text input.
Electron2D.InputEventKey() Constructor Initializes a new instance of the InputEventKey type.

Member Details

Echo

Kind: Property

public System.Boolean Echo { get; set; }

Summary

Gets or sets whether this event is an echo repeat while the key is held.

Remarks

This property follows the validation and lifetime rules of its declaring type.

Value

The current echo value.

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.InputEventKey

KeyLabel

Kind: Property

public Electron2D.Key KeyLabel { get; set; }

Summary

Gets or sets the localized key label.

Remarks

This property follows the validation and lifetime rules of its declaring type.

Value

The current key label value.

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.InputEventKey

Keycode

Kind: Property

public Electron2D.Key Keycode { get; set; }

Summary

Gets or sets the layout key code.

Remarks

This property follows the validation and lifetime rules of its declaring type.

Value

The current keycode value.

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.InputEventKey

Location

Kind: Property

public Electron2D.KeyLocation Location { get; set; }

Summary

Gets or sets the left/right key location for modifier keys.

Remarks

This property follows the validation and lifetime rules of its declaring type.

Value

The current location value.

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.InputEventKey

PhysicalKeycode

Kind: Property

public Electron2D.Key PhysicalKeycode { get; set; }

Summary

Gets or sets the physical key code on a US QWERTY keyboard layout.

Remarks

This property follows the validation and lifetime rules of its declaring type.

Value

The current physical keycode value.

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.InputEventKey

Pressed

Kind: Property

public System.Boolean Pressed { get; set; }

Summary

Gets or sets whether the key is pressed.

Remarks

This property follows the validation and lifetime rules of its declaring type.

Value

The current pressed value.

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.InputEventKey

Unicode

Kind: Property

public System.Int32 Unicode { get; set; }

Summary

Gets or sets the Unicode scalar value produced by platform text input.

Remarks

This property follows the validation and lifetime rules of its declaring type.

Value

The current unicode value.

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.InputEventKey

Electron2D.InputEventKey()

Kind: Constructor

public Electron2D.InputEventKey()

Summary

Initializes a new instance of the InputEventKey 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.InputEventKey

Clone this wiki locally