Table of Contents

Class Driver

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

Holds global driver settings and cross-driver utility methods.

public sealed class Driver
Inheritance
Driver
Inherited Members

Constructors

Driver()

Properties

Force16Colors

Determines if driver instances should use 16 colors instead of the default TrueColors.

SizeDetection

Controls how the ANSI driver detects the terminal's window size. Defaults to AnsiQuery, which sends a CSI 18t ANSI escape-sequence query to obtain the terminal size. Set to Polling to use a synchronous native syscall (ioctl on Unix, Console API on Windows) instead — useful when the ANSI query response does not reflect the remote terminal size (e.g., over an SSH tunnel).

Methods

IsAttachedToTerminal(out bool, out bool)

Determines whether the process is attached to a real terminal (i.e. stdin/stdout are connected to a console device rather than redirected or running inside a test harness). Set the environment variable "DisableRealDriverIO=1" to skip real terminal detection and force this method to return false, which is required for running in test harnesses that do not have a real terminal attached.

Events

Force16ColorsChanged

Raised when Force16Colors changes.