docfx/apispec/namespace-drivers.md
The Drivers namespace provides the platform abstraction layer enabling Terminal.Gui to run consistently across Windows, macOS, and Linux/Unix.
| Driver | Platform | Description |
|---|---|---|
windows | Windows | Native Win32 Console API with highest performance |
unix | Unix/Linux/macOS | Direct syscalls with ANSI sequences |
dotnet | All | Cross-platform using System.Console |
ansi | All | Pure ANSI implementation, ideal for testing |
// Automatic (recommended)
app.Init (); // Selects best driver for platform
// Explicit selection
app.Init (DriverRegistry.Names.ANSI);
// Via configuration
app.ForceDriver = DriverRegistry.Names.UNIX;
app.Init ();
The driver architecture uses a multi-threaded design:
This separation ensures responsive input handling even during intensive UI operations.
See the Cross-Platform Driver Model for comprehensive details.