Table of Contents

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

key KeyCode
character char
modifiers KeyModifiers

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

char

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

KeyModifiers

Properties

HasAlt

public bool HasAlt { get; }

Property Value

bool

HasCtrl

public bool HasCtrl { get; }

Property Value

bool

HasShift

public bool HasShift { get; }

Property Value

bool

Methods

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.