I'm working on a terminal emulator written in js, built on top of node-pty and now I'm testing on windows. I'm currently stuck on trying to send mouse control sequences to the terminal, which I test on MidnightCommander ran in powershell. Here's my pty constructor:
var ptyProcess = pty.spawn('powershell.exe', [], {
name: 'ms-terminal',
cols: 120,
rows: 40,
cwd: "E:/cwd",
env: process.env,
useConpty: true
});
I tried to send the mouse click event sequence in this format \x1b[<0;x;yM", but that doesn't seem to do anything. Until I switch and stop using conpty: useConpty: false then this sequence works perfectly. But obviously I want to keep using conpty with my application. I also tried to start the session with sequences to enable mouse event reporting: ptyProcess.write("\x1b[?1003h\x1b[?1015h\x1b[?1002h\x1b[?1006h"), but this also didn't help.
Am I using wrong kind of sequences that are not compatible with conpty? What should I do to be able to send mouse data to terminal with conpty and are there any ways to test it other than using midnight commander?