Also known as pan down, new lines fill in from the bottom of the screen Scroll refers to which direction the text moves during the operation, not which way the viewport would seem to move. SequenceĪll commands in this section are generally equivalent to calling ScrollConsoleScreenBuffer console API to move the contents of the console buffer.Ĭaution The command names are misleading. The DECTCEM sequences are generally equivalent to calling SetConsoleCursorInfo console API to toggle cursor visibility.
The following commands control the visibility of the cursor and it’s blinking state. ** ANSI.sys historical documentation can be found at and is implemented for convenience/compatibility.If and are omitted, they will be set to 1 1. * and parameters have the same limitations as above.**With no parameters, performs a restore cursor operation like DECRC **With no parameters, performs a save cursor operation like DECSC *Cursor moves to coordinate within the viewport, where is the column of the line cannot be larger than 32,767 (maximum short value)Īll commands in this section are generally equivalent to calling the SetConsoleCursorPosition console API.Ĭursor down to beginning of th line in the viewportĬursor up to beginning of th line in the viewportĬursor moves to th position horizontally in the current lineĬursor moves to the th position vertically in the current column.If is omitted or equals 0, it will be treated as a 1.represents the distance to move and is an optional parameter.Each table below is grouped by functionality with notes below each table explaining how the group works.įor all parameters, the following rules apply unless otherwise noted: This will be represented by the shorthand. All CSI sequences start with ESC ( 0x1B ) followed by [ ( 0x5B ) and may contain parameters of variable length to specify more information for each operation. The following tables encompass Control Sequence Introducer ( CSI) type sequences. The only way to access the saved value is with the restore command. **There will be no value saved in memory until the first use of the save command.*If there are scroll margins set, RI inside the margins will scroll only the contents of the margins, and leave the viewport unchanged.Reverse Index – Performs the reverse operation of \n, moves cursor up one line, maintains horizontal position, scrolls buffer if necessary* These sequences have no parameters and take effect immediately.Īll commands in this table are generally equivalent to calling the SetConsoleCursorPosition console API to place the cursor.Ĭursor movement will be bounded by the current viewport into the buffer. The following table describes simple escape sequences with a single action command directly after the ESC character. For an example of how these sequences are used in practice, please see the example at the end of this topic. No spaces are to be included in terminal sequences. In all of the following descriptions, ESC is always the hexadecimal value 0x1B. Note that the DISABLE_NEWLINE_AUTO_RETURN flag may also be useful in emulating the cursor positioning and scrolling behavior of other terminal emulators in relation to characters written to the final column in any row. The following terminal sequences are intercepted by the console host when written into the output stream, if the ENABLE_VIRTUAL_TERMINAL_PROCESSING flag is set on the screen buffer handle using the SetConsoleMode flag.