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
HasCmd
public bool HasCmd { get; }
Property Value
HasCmdOrCtrl
True when the primary command modifier for the current platform is held. On macOS this is Cmd; on other platforms this is Ctrl. Use this for clipboard/undo/select-all shortcuts so they feel native everywhere.
public bool HasCmdOrCtrl { 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.