- May
- 13,834
- 211
Thanks to Dustin Howett in the WT forum for this. It's pretty thorough but has nothing to do with WT per se. WT implements a lot of it.
XTerm Control Sequences (Edward Moy)
XTerm Control Sequences (Edward Moy)
By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now! GetConsoleMode(hIn, &dwInputMode);
SetConsoleMode(hIn, (dwInputMode | ENABLE_VIRTUAL_TERMINAL_INPUT) & ~ENABLE_LINE_INPUT);
WriteConsole(hOut, szQueryAll, nQueryAllLength, &dwWritten, 0);
WaitForSingleObject(hIn, 100);
ReadConsole(hIn, szResponseAll, 600, &dwRead, 0); // expecting 522 characters
SetConsoleMode(hIn, dwInputMode);
#define OSC L"\x001b]" // Operating System Command
#define ST L"\x001b\x005c" // (ESC \) long version of Sequence Terminator
INT nQueryAllLength = wsprintf(szQueryAll,
OSC L"4;0;?;1;?;2;?;3;?;4;?;5;?;6;?;7;?;8;?;9;?;10;?;11;?;12;?;13;?;14;?;15;?" ST OSC L"10;?;?;?;;;;;?" ST);
v:\> echo %esc%]4;0;?;1;?;2;?;3;?;4;?;5;?;6;?;7;?;8;?;9;?;10;?;11;?;12;?;13;?;14;?;15;?%esc%\%esc%]10;?;?;?;;;;;?%esc%\
v:\> ^[]4;0;rgb:0c0c/0c0c/0c0c^[\^[]4;1;rgb:c5c5/0f0f/1f1f^[\^[]4;2;rgb:1313/a1a1/0e0e^[\^[]4;3;rgb:c1c1/9c9c/0000^[\
^[]4;4;rgb:0000/3737/dada^[\^[]4;5;rgb:8888/1717/9898^[\^[]4;6;rgb:3a3a/9696/dddd^[\^[]4;7;rgb:cccc/cccc/cccc^[\
^[]4;8;rgb:7676/7676/7676^[^[\^[]4;9;rgb:e7e7/4848/5656^[\^[]4;10;rgb:1616/c6c6/0c0c^[\^[]4;11;rgb:f9f9/f1f1/a5a5^[\
^[]4;12;rgb:3b3b/7878/ffff^[\^[]4;13;rgb:b4b4/0000/9e9e^[\^[]4;14;rgb:6161/d6d6/d6d6^[\^[]4;15;rgb:f2f2/f2f2/f2f2^[\
^[]10;rgb:cccc/cccc/cccc^[\^[]11;rgb:0c0c/0c0c/0c0c^[\^[]12;rgb:ffff/ffff/ffff^[\^[]17;rgb:ffff/ffff/ffff^[\
v:\> echo %_theme
1 (Campbell)
v:\> echo %esc%[6n
v:\> ^[[11;1R
v:\> echo %esc%[0c
v:\> ^[[?61;4;6;7;14;21;22;23;24;28;32;42c