ENABLE_VIRTUAL_TERMINAL_PROCESSING is set by default in pseudo console on Windows 10 20H2. #12940

Open
opened 2026-01-31 03:29:31 +00:00 by claunia · 0 comments
Owner

Originally created by @tyan0 on GitHub (Mar 10, 2021).

Environment

Windows 10 20H2 (Version 10.0.19042.804)

Steps to reproduce

  1. Compile the following test code.
  2. Run the test program in pseudo console (e.g. in WSL).
#include <windows.h>
#include <stdio.h>

int main()
{
	DWORD mode;
	GetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE), &mode);
	printf("%d\n", mode & ENABLE_VIRTUAL_TERMINAL_PROCESSING);
	return 0;
}

Expected behavior

At least on older Windows 10 such as 1809, the result is:

0

Actual behavior

On Windows 20H2, the result is:

4

Is this the intentional behavior?

Originally created by @tyan0 on GitHub (Mar 10, 2021). # Environment Windows 10 20H2 (Version 10.0.19042.804) # Steps to reproduce 1. Compile the following test code. 2. Run the test program in pseudo console (e.g. in WSL). ``` #include <windows.h> #include <stdio.h> int main() { DWORD mode; GetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE), &mode); printf("%d\n", mode & ENABLE_VIRTUAL_TERMINAL_PROCESSING); return 0; } ``` # Expected behavior At least on older Windows 10 such as 1809, the result is: ``` 0 ``` # Actual behavior On Windows 20H2, the result is: ``` 4 ``` Is this the intentional behavior?
claunia added the Resolution-Duplicate label 2026-01-31 03:29:31 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#12940