Class AnsiInputProcessor
Input processor for AnsiInput, processes a char stream using pure ANSI escape sequence handling.
ANSI Driver Architecture:
This processor integrates with Terminal.Gui's ANSI infrastructure:
<ul><li>
<xref href="Terminal.Gui.Drivers.AnsiResponseParser" data-throw-if-not-resolved="false"></xref> - Automatically parses ANSI escape sequences
from the input stream, extracting keyboard events, mouse events, and terminal responses.
</li><li>
<xref href="Terminal.Gui.Drivers.AnsiRequestScheduler" data-throw-if-not-resolved="false"></xref> - Manages outgoing ANSI requests (via
<xref href="Terminal.Gui.Drivers.IDriver.QueueAnsiRequest(Terminal.Gui.Drivers.AnsiEscapeSequenceRequest)" data-throw-if-not-resolved="false"></xref>)
and matches responses from the parser.
</li><li>
<xref href="Terminal.Gui.Drivers.AnsiKeyConverter" data-throw-if-not-resolved="false"></xref> - Converts character input to <xref href="Terminal.Gui.Input.Key" data-throw-if-not-resolved="false"></xref> events,
shared with UnixDriver for consistent ANSI-based key mapping.
</li><li>
<xref href="Terminal.Gui.Drivers.AnsiKeyboardEncoder" data-throw-if-not-resolved="false"></xref> and <xref href="Terminal.Gui.Drivers.AnsiMouseEncoder" data-throw-if-not-resolved="false"></xref> - Convert
<xref href="Terminal.Gui.Input.Key" data-throw-if-not-resolved="false"></xref> and <xref href="Terminal.Gui.Input.Mouse" data-throw-if-not-resolved="false"></xref> events into ANSI sequences for test injection.
</li></ul>
The parser is configured in the base class InputProcessorImpl<TInputRecord> with
HandleMouse = true and HandleKeyboard = true, enabling automatic event raising.
public class AnsiInputProcessor : InputProcessorImpl<char>, IInputProcessor, IDisposable
- Inheritance
-
AnsiInputProcessor
- Implements
- Inherited Members
Constructors
Methods
- InjectKeyDownEvent(Key)
Injects a key down event. For unit tests.
- InjectMouseEvent(IApplication?, Mouse)
Enqueues a mouse event. For unit tests.
- Process(char)
Processes a single input element dequeued from InputQueue. Called sequentially for each dequeued value.