Table of Contents

Property IsLegacyConsole

Namespace
Terminal.Gui.Drivers
Assembly
Terminal.Gui.dll

IsLegacyConsole

Gets whether the driver has detected the console requires legacy console API (Windows Console API without ANSI/VT support). Returns true for legacy consoles that don't support modern ANSI escape sequences (e.g. Windows conhost); false for modern terminals with ANSI/VT support.

bool IsLegacyConsole { get; }

Property Value

bool

Remarks

This property indicates whether the terminal supports modern ANSI escape sequences for input/output. On Windows, this maps to whether Virtual Terminal processing is enabled. On Unix-like systems, this is typically false as they support ANSI by default.

When true, the driver must use legacy Windows Console API functions (e.g., WriteConsoleW, SetConsoleTextAttribute) instead of ANSI escape sequences.