Windows 10 ANSI color

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?
Locked
cameyo
Posts: 183
Joined: Sun Mar 27, 2011 3:07 pm
Location: Italy
Contact:

Windows 10 ANSI color

Post by cameyo »

The console in Windows 10 support VT (Virtual Terminal) / ANSI escape sequences but it is disable by default.
To activate it:
in registry key [HKEY_CURRENT_USER\Console], create or set the VirtualTerminalLevel DWORD value to 1.
(or from cmd.exe :

Code: Select all

reg add HKCU\Console /v VirtualTerminalLevel /t REG_DWORD /d 1
)
To deactivate it:
in registry key [HKEY_CURRENT_USER\Console], create or set the VirtualTerminalLevel DWORD value to 0.

You must open a new console window for changes to take effect.
For example use the ANSI color when debugging:

Code: Select all

(trace-highlight "\027[0;31m" "\027[0;0m") ;red text color

Code: Select all

(trace-highlight "\027[0;7m" "\027[0;0m")  ;negative
cameyo

Locked