vt100

Windows console “ESC[2J” doesn't really “clear” the screen

南楼画角 提交于 2021-02-10 16:13:46
问题 I know this kind of questions are asked frequently, but I think this one is a little different and needed to be asked. The new Windows console supports ANSI (VT100) control codes: ANSI/VT100 control codes & Windows document: the control codes. However, ESC[2J doesn't really "clear" the screen, it just scrolls down to "hide" printed contents. Only ESC[H + ESC[J really "clears" the currently showed contents on the screen. Is this a bug or it is designed to do this? Is it written on some kind of

Windows console “ESC[2J” doesn't really “clear” the screen

纵然是瞬间 提交于 2021-02-10 16:10:52
问题 I know this kind of questions are asked frequently, but I think this one is a little different and needed to be asked. The new Windows console supports ANSI (VT100) control codes: ANSI/VT100 control codes & Windows document: the control codes. However, ESC[2J doesn't really "clear" the screen, it just scrolls down to "hide" printed contents. Only ESC[H + ESC[J really "clears" the currently showed contents on the screen. Is this a bug or it is designed to do this? Is it written on some kind of

How to identify the Terminal Emulator being used?

十年热恋 提交于 2021-01-28 04:42:12
问题 I'm developing a library that needs to identify the running terminal emulator in order to output emulator-specific escape code sequences. For example, iTerm 2 uses the following proprietary sequence: ESC ] 50 ; CurrentDir=/path/to/dir BEL While ConEmu uses the following proprietary sequence: ESC ] 9 ; 9 ; C:\path\to\dir BEL Now, I need to query the terminal (either using environment variables or using an escape sequence) in order to output the correct terminal-specific codes. How can I

How to use vt100 code in Windows

家住魔仙堡 提交于 2021-01-27 10:26:53
问题 I try to move the cursor in console. And I find out that vt100 code could do this. #include<stdio.h> int main() { printf("123456789\n"); printf("\033A"); printf("abcdefghi\n"); return 0; } Its output is not the same as planned. this is what the code above print in console. In the second line there's a small arrow before "A", it cant put on the web 123456789 Aabcdefghi How to use the vt100 code when programming in Visual Studio in Windows? 回答1: Not all Windows platforms support VT100. Only

what is terminal escape sequence for ctrl + arrow (left, right,…) in TERM=linux

杀马特。学长 韩版系。学妹 提交于 2020-01-09 19:16:02
问题 I am building a terminal window in a browser (sth. like ajaxterm) and don't know which escape sequence to send to ssh tunnel (opened via paramiko.SSHClient().invoke_shell(term='linux') ). I have found a key logger and tried it in a terminal with $TERM == 'linux', but it returns the same sequence for ctrl+left and left (27,91,68). If I try keylogger in another terminal (with $TERM == 'xterm') I get the codes (27,91,49,59,53,68). But these codes do not move generate the expected output from SSH

what is terminal escape sequence for ctrl + arrow (left, right,…) in TERM=linux

≯℡__Kan透↙ 提交于 2020-01-09 19:13:31
问题 I am building a terminal window in a browser (sth. like ajaxterm) and don't know which escape sequence to send to ssh tunnel (opened via paramiko.SSHClient().invoke_shell(term='linux') ). I have found a key logger and tried it in a terminal with $TERM == 'linux', but it returns the same sequence for ctrl+left and left (27,91,68). If I try keylogger in another terminal (with $TERM == 'xterm') I get the codes (27,91,49,59,53,68). But these codes do not move generate the expected output from SSH

what is terminal escape sequence for ctrl + arrow (left, right,…) in TERM=linux

大憨熊 提交于 2020-01-09 19:11:30
问题 I am building a terminal window in a browser (sth. like ajaxterm) and don't know which escape sequence to send to ssh tunnel (opened via paramiko.SSHClient().invoke_shell(term='linux') ). I have found a key logger and tried it in a terminal with $TERM == 'linux', but it returns the same sequence for ctrl+left and left (27,91,68). If I try keylogger in another terminal (with $TERM == 'xterm') I get the codes (27,91,49,59,53,68). But these codes do not move generate the expected output from SSH

what is terminal escape sequence for ctrl + arrow (left, right,…) in TERM=linux

梦想的初衷 提交于 2020-01-09 19:10:42
问题 I am building a terminal window in a browser (sth. like ajaxterm) and don't know which escape sequence to send to ssh tunnel (opened via paramiko.SSHClient().invoke_shell(term='linux') ). I have found a key logger and tried it in a terminal with $TERM == 'linux', but it returns the same sequence for ctrl+left and left (27,91,68). If I try keylogger in another terminal (with $TERM == 'xterm') I get the codes (27,91,49,59,53,68). But these codes do not move generate the expected output from SSH

How, and whether, to colorize text without Ncurses

烈酒焚心 提交于 2019-12-22 01:39:55
问题 Ncurses can colorize text but GNU utilities like ls and diff apparently colorize text without calling Ncurses. Can I, too, portably colorize text without calling Ncurses? For example, in C: printf("the word \033[32mgreen\033[0m is printed in color\n"); This works on my installation but does not look very portable. On the other hand, if ls and diff do it more or less in this way, then who am I to call the technique nonportable? Examining GNU sources, I notice that ls uses dircolors or $LS

keyboard transmit mode in vt100 terminal emulator

夙愿已清 提交于 2019-12-22 00:28:38
问题 I'm implementing a vt100 terminal emulator in javascript and the vt100 spec (from man terminfo and infocmp ) tells me that smkx=\E[?1h\E= is the code to enter key-board transmit mode and rmkx=\E[?1l\E> is the code to leave 'key-board transmit' mode. I couldn't really understand what key-board transmit mode is. From http://vt100.net/dec/ek-vt220-tm-001.pdf, 7.4.4.1 Keyboard Transmit Mode -- The keyboard codes and a few other special codes are transmitted via a serial line output in PORT of the