Windows 10 ANSI color

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?

Windows 10 ANSI color

Postby cameyo » Thu Feb 07, 2019 11:22 am

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
cameyo
 
Posts: 32
Joined: Sun Mar 27, 2011 3:07 pm

Return to newLISP and the O.S.

Who is online

Users browsing this forum: No registered users and 1 guest