Skip to content

Commit 165331a

Browse files
committed
feat: support virtual terminal input
1 parent 3a7c731 commit 165331a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,9 @@ static void __cdecl InputHandlerThread(LPVOID arg) {
443443
DWORD mode;
444444

445445
GetConsoleMode(hStdin, &mode);
446-
SetConsoleMode(hStdin, (mode & ~ENABLE_LINE_INPUT) & ~ENABLE_ECHO_INPUT);
446+
mode &= ~(ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT);
447+
mode |= ENABLE_VIRTUAL_TERMINAL_INPUT;
448+
SetConsoleMode(hStdin, mode);
447449

448450
char buffer;
449451
DWORD bytesRead, bytesWritten;

0 commit comments

Comments
 (0)