
Virtual terminal sequences hold a major advantage for remote access. An extensive adapter or translation library must be written between Windows and virtual terminal, or vice-versa, when attempting to port command-line utilities from one platform or another. Virtual terminal sequences are natively supported across platforms, making terminal applications and command-line utilities easily portable between versions and variations of operating systems, with the exception of Windows.īy contrast, Windows Console APIs are only supported on Windows. Many extensions exist within the virtual terminal sequence domain and some sequences are more widely supported than others, but it is safe to say that the world has standardized on this as the command language for command-line experiences with a well-known subset being supported by virtually every terminal and command-line client application. These sequences are rooted in an ECMA Standard and series of extensions by many vendors tracing back to Digital Equipment Corporation and Tektronix terminals, through to more modern and common software terminals, like xterm. (For a time, Microsoft supported this behavior too in early editions of DOS and Windows through a driver called ANSI.SYS.)īy contrast, virtual terminal sequences (in a variety of dialects) drive the command-line environment operations for all other platforms. However, other non-Windows platforms have never afforded this specific API-driven approach to their command-line environments, choosing instead to use virtual terminal sequences embedded within the standard input and standard output streams. The Windows Console provides a broad API surface for client command-line applications to manipulate both the output display buffer and the user input buffer. Virtual terminal sequences use non-printable escape characters for signaling commands interleaved with normal printable text. Virtual terminal sequences is defined as a language of commands that's embedded in the standard input and standard output streams.


The classic Windows Console API surface is defined as the series of C language functional interfaces on kernel32.dll with "Console" in the name. This article will outline the difference between the two and discuss the reasons for our recommendation.

Our recommendation is to replace the classic Windows Console API with virtual terminal sequences.
