Struct TerminalKeyEvent
- Namespace
- RatatuiUnity
A keyboard event in the terminal context. Carries both the Unity KeyCode and the typed character (if any).
public readonly struct TerminalKeyEvent
- Inherited Members
Constructors
TerminalKeyEvent(KeyCode, char, KeyModifiers)
public TerminalKeyEvent(KeyCode key, char character, KeyModifiers modifiers)
Parameters
keyKeyCodecharactercharmodifiersKeyModifiers
Fields
Character
Typed character from Input.inputString. '\0' if this is a non-character key (arrows, function keys, etc.).
public readonly char Character
Field Value
Key
Unity key code (e.g. KeyCode.Return, KeyCode.UpArrow).
public readonly KeyCode Key
Field Value
- KeyCode
Modifiers
Active modifier keys at the time of the event.
public readonly KeyModifiers Modifiers
Field Value
Properties
HasAlt
public bool HasAlt { get; }
Property Value
HasCtrl
public bool HasCtrl { get; }
Property Value
HasShift
public bool HasShift { get; }
Property Value
Methods
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.