Table of Contents

Class InputProcessor<T>

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

Processes the queued input buffer contents - which must be of Type T. Is responsible for ProcessQueue() and translating into common Terminal.Gui events and data models.

public abstract class InputProcessor<T> : IInputProcessor

Type Parameters

T
Inheritance
InputProcessor<T>
Implements
Derived
Inherited Members

Constructors

InputProcessor(ConcurrentQueue<T>, IKeyConverter<T>)

Constructs base instance including wiring all relevant parser events and setting InputBuffer to the provided thread safe input collection.

Properties

InputBuffer

Input buffer which will be drained from by this class.

KeyConverter

Class responsible for translating the driver specific native input class T e.g. ConsoleKeyInfo into the Terminal.Gui Key class (used for all internal library representations of Keys).

Methods

GetParser()

Gets the response parser currently configured on this input processor.

OnKeyDown(Key)

Called when a key is pressed down. Fires the KeyDown event. This is a precursor to OnKeyUp(Key).

OnKeyUp(Key)

Called when a key is released. Fires the KeyUp event.

OnMouseEvent(MouseEventArgs)

Called when a mouse event occurs. Fires the MouseEvent event.

Process(T)

Process the provided single input element input. This method is called sequentially for each value read from InputBuffer.

ProcessAfterParsing(T)

Process the provided single input element - short-circuiting the Terminal.Gui.InputProcessor<T>.Parser stage of the processing.

ProcessQueue()

Drains the InputBuffer buffer, processing all available keystrokes

Events

AnsiSequenceSwallowed

Event fired when a terminal sequence read from input is not recognized and therefore ignored.

KeyDown

Event fired when a key is pressed down. This is a precursor to KeyUp.

KeyUp

Event fired when a key is released.

MouseEvent

Event fired when a mouse event occurs.