Table of Contents

Struct KeyEvent

Namespace
Retro.Crt.Input
Assembly
Retro.Crt.dll

One decoded key press. Key identifies what was hit; Glyph carries the character when Key is Glyph (otherwise '\0'); Modifiers reports any held modifiers the terminal surfaced.

public readonly record struct KeyEvent : IEquatable<KeyEvent>
Implements
Inherited Members

Constructors

KeyEvent(Key, char, KeyModifiers)

One decoded key press. Key identifies what was hit; Glyph carries the character when Key is Glyph (otherwise '\0'); Modifiers reports any held modifiers the terminal surfaced.

public KeyEvent(Key Key, char Glyph = '\0', KeyModifiers Modifiers = KeyModifiers.None)

Parameters

Key Key
Glyph char
Modifiers KeyModifiers

Properties

Glyph

public char Glyph { get; init; }

Property Value

char

Key

public Key Key { get; init; }

Property Value

Key

Modifiers

public KeyModifiers Modifiers { get; init; }

Property Value

KeyModifiers