Skip to content

Consider implicitly activating VT / ANSI escape-sequence support for native programs in conhost.exe console windows on Windows #19101

@mklement0

Description

@mklement0

Summary of the new feature / enhancement

The following environments on Windows already automatically (and invariably) support VT / ANSI escape sequences in output from native (external) programs, notably to produce colored output.

  • Windows Terminal
  • Visual Studio Code's integrated terminal.

By contrast, in console windows (provided by conhost.exe) the support depends on a registry setting that is OFF by default (Set-ItemProperty HKCU:\Console VirtualTerminalLevel -Type DWORD 1 enables it).
(Note: Some CLIs explicitly enable VT support for themselves, using the WinAPI, pwsh.exe and wsl.exe being examples; these do not depend on the registry setting, but all other ones do.)

Making VT support implicit (independent of the registry setting) even for native programs seems worthwhile, to align with user expectations and a modern terminal user experience.

Given that the change only affects how data is displayed, there shouldn't be a backward-compatibility concern.

Implicitly enabling support would also:

Proposed technical implementation details (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugResolution-ExternalThe issue is caused by external component(s).WG-Interactive-Consolethe console experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions