![]() Most terminals support 8 and 16 colors, as well as 256 (8-bit) colors. The ESC[21m sequence is a non-specified sequence for double underline mode and only work in some terminals and is reset with ESC[24m. Note: Both dim and bold modes are reset with the ESC[22m sequence. Note: Some terminals may not support some of the graphic mode sequences listed above. Set graphics modes for cell, separated by semicolon ( ). You can use \r after erasing the line, to return the cursor to the start of the current line. Note: Erasing the line won't move the cursor, meaning that the cursor will stay at the last position it was at before the line was erased. It is therefore recommended to use DEC sequences. xterm and derived) support both SCO and DEC sequences, they are likely to have different functionality. Note: Some sequences, like saving and restoring cursors, are private sequences and are not standardized. Restores the cursor to the last saved position (SCO) Restores the cursor to the last saved position (DEC) Moves cursor one line up, scrolling if needed Request cursor position (reports as ESC[#R) Moves cursor to beginning of previous line, # lines up Moves cursor to beginning of next line, # lines down This is a common representation (and input method) and historically comes from one of the VT series of terminals. ASCII code 1 would be ^A (Ctrl-A), while ASCII code 7 (BEL) would be ^G (Ctrl-G). Note: The Ctrl-Key representation is simply associating the non-printable characters from ASCII code 1 with the printable (letter) characters from ASCII code 65 ("A"). It is recommended to use the decimal, octal or hex representation as escape code. Note: Some control escape sequences, like \e for ESC, are not guaranteed to work in all languages and compilers. They are present for improved readability. OSC - Operating System Command: sequence starting with ESC ] or OSC ( \x9D)Īny whitespaces between sequences and arguments should be ignored.DCS - Device Control String: sequence starting with ESC P or DCS ( \x90).CSI - Control Sequence Introducer: sequence starting with ESC [ or CSI ( \x9B).ESC - sequence starting with ESC ( \x1B).Standard escape codes are prefixed with Escape:įollowed by the command, somtimes delimited by opening square bracket ( [), known as a Control Sequence Introducer (CSI), optionally followed by arguments and the command itself.Īrguments are delimeted by semi colon ( ).įor example: \x1b[1 31m # Set style to bold, red foreground.
0 Comments
Leave a Reply. |