Struct KeyEvent
- Namespace
- ItTiger.TigerCli.Primitives
- Assembly
- ItTiger.TigerCli.dll
Keyboard event captured by a terminal or test terminal.
public readonly record struct KeyEvent : IEquatable<KeyEvent>
- Implements
- Inherited Members
Constructors
KeyEvent(ConsoleKey, ConsoleModifiers)
Keyboard event captured by a terminal or test terminal.
public KeyEvent(ConsoleKey Key, ConsoleModifiers Mods)
Parameters
KeyConsoleKeyModsConsoleModifiers
KeyEvent(ConsoleKey, ConsoleModifiers, char)
Creates a key event with an explicit character value.
public KeyEvent(ConsoleKey key, ConsoleModifiers mods, char keyChar)
Parameters
keyConsoleKeymodsConsoleModifierskeyCharchar
Properties
Key
public ConsoleKey Key { get; init; }
Property Value
KeyChar
Character associated with the key event, or
'\0' when none was supplied.public char KeyChar { get; init; }
Property Value
Mods
public ConsoleModifiers Mods { get; init; }