-
Notifications
You must be signed in to change notification settings - Fork 8.7k
Open
Labels
Area-InputRelated to input processing (key presses, mouse, etc.)Related to input processing (key presses, mouse, etc.)Area-VTVirtual Terminal sequence supportVirtual Terminal sequence supportHelp WantedWe encourage anyone to jump in on these.We encourage anyone to jump in on these.Issue-BugIt either shouldn't be doing this or needs an investigation.It either shouldn't be doing this or needs an investigation.Product-ConhostFor issues in the Console codebaseFor issues in the Console codebaseProduct-ConptyFor console issues specifically related to conptyFor console issues specifically related to conpty
Milestone
Description
Steps to reproduce
- Compile this test app using gcc under WSL:
#include <termios.h>
#include <assert.h>
#include <errno.h>
#include <signal.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
int main()
{
struct termios _ts = {};
int _ts_r = tcgetattr(1, &_ts);
if (_ts_r == 0) {
struct termios ts_ne = _ts;
//ts_ne.c_lflag &= ~(ECHO | ECHONL);
cfmakeraw(&ts_ne);
if (tcsetattr(1, TCSADRAIN, &ts_ne ) != 0) {
perror("TTYBackend: tcsetattr");
}
}
fprintf(stderr, "\x1b[?1049h");
fprintf(stderr, "\x1b[?1000h");
fprintf(stderr, "\x1b[?1001h");
fprintf(stderr, "\x1b[?1002h");
fprintf(stderr, "\x1b[?9001h");
for (;;) {
char ch = 0;
if (read(0, &ch, 1) <= 0) break;
if (ch <= 0x20 || ch == 0x7f) {
if (ch == 0x1b) fprintf(stderr, " ");
fprintf(stderr, "\\x%02x", (unsigned int)(unsigned char)ch);
} else {
fprintf(stderr, "%c", ch);
}
if (ch == 0x0d) break;
if (ch == 0x0a) break;
}
fprintf(stderr, "\x1b[?1049l");
fprintf(stderr, "\x1b[?1000l");
fprintf(stderr, "\x1b[?1001l");
fprintf(stderr, "\x1b[?1002l");
fprintf(stderr, "\x1b[?9001l");
if (tcsetattr(1, TCSADRAIN, &_ts ) != 0) {
perror("TTYBackend: tcsetattr");
}
}
-
Run it under Windows Terminal
-
Move mouse over the terminal window.
Expected Behavior
We should see mouse movement escape sequences (\x1b[M...
format)
Actual Behavior
We see win32-input-mode escape sequences (\x1b[A;B;C;D;E;F_
format)
Metadata
Metadata
Assignees
Labels
Area-InputRelated to input processing (key presses, mouse, etc.)Related to input processing (key presses, mouse, etc.)Area-VTVirtual Terminal sequence supportVirtual Terminal sequence supportHelp WantedWe encourage anyone to jump in on these.We encourage anyone to jump in on these.Issue-BugIt either shouldn't be doing this or needs an investigation.It either shouldn't be doing this or needs an investigation.Product-ConhostFor issues in the Console codebaseFor issues in the Console codebaseProduct-ConptyFor console issues specifically related to conptyFor console issues specifically related to conpty