Escape sequences

Source: AIX info system

  The following is a list of the escape sequences supported by the
  aixterm command.
  
  Some escape sequences activate and deactivate an alternate screen
  buffer that is the same size  as  the display area of the window.
  This capability allows the contents of the screen to be saved and
  restored.    When  the alternate screen is activated, the current
  screen is saved and replaced with the alternate screen.  The sav-
  ing of lines scrolled off of the window is disabled until the or-
  iginal screen is restored.
  
  This table uses these abbreviations in the righthand column:
  
  Xv	Supported by the aixterm command running in vt100 mode.
  
  Xh	Supported by the aixterm command running in hft mode.
  
  H	Found in the hft datastream.
  
  V	Found in the vt100 datastream.
  
  -----------------------------------------------------------------------------------
  |Name    |Function                          |Datastream             |Support      |
  -----------------------------------------------------------------------------------
  |        |SINGLE-BYTE CONTROLS              |                       |             |
  -----------------------------------------------------------------------------------
  |BEL     |Bell                              |0x07                   |Xv, Xh, H, V |
  -----------------------------------------------------------------------------------
  |BS      |Backspace                         |0x08                   |Xv, Xh, H, V |
  -----------------------------------------------------------------------------------
  |HT      |Horizontal tab                    |0x09                   |Xv, Xh, H, V |
  -----------------------------------------------------------------------------------
  |LF      |Linefeed                          |0x0A                   |Xv, Xh, H, V |
  -----------------------------------------------------------------------------------
  |VT      |Vertical tab                      |0x0B                   |Xv, Xh, H, V |
  -----------------------------------------------------------------------------------
  |FF      |Form feed                         |0x0C                   |Xv, Xh, H, V |
  -----------------------------------------------------------------------------------
  |CR      |Carriage return                   |0x0D                   |Xv, Xh, H, V |
  -----------------------------------------------------------------------------------
  |SO      |Shift out                         |0x0E                   |Xv, Xh, H, V |
  -----------------------------------------------------------------------------------
  |SI      |Shift in                          |0x0F                   |Xv, Xh, H, V |
  -----------------------------------------------------------------------------------
  |DC1     |Device control 1                  |0x11                   |H, V         |
  -----------------------------------------------------------------------------------
  |DC3     |Device control 3                  |0x13                   |H, V         |
  -----------------------------------------------------------------------------------
  |CAN     |Cancel                            |0x18                   |H, V         |
  -----------------------------------------------------------------------------------
  |SUB     |Substitute (also cancels)         |0x1A                   |H, V         |
  -----------------------------------------------------------------------------------
  |ESC     |Escape                            |0x1B                   |Xv, Xh, H, V |
  -----------------------------------------------------------------------------------
  |SS4     |Single Shift 4                    |0x1C                   |H            |
  -----------------------------------------------------------------------------------
  |SS3     |Single Shift 3                    |0x1D                   |H            |
  -----------------------------------------------------------------------------------
  |SS2     |Single Shift 2                    |0x1E                   |H            |
  -----------------------------------------------------------------------------------
  |SS1     |Single Shift 1                    |0x1F                   |H            |
  -----------------------------------------------------------------------------------
  |cbt     |cursor back tab                   |ESC [ Pn Z             |Xv, Xh, H    |
  -----------------------------------------------------------------------------------
  |cha     |cursor horizontal absolute        |ESC [ Pn G             |Xv, Xh, H    |
  -----------------------------------------------------------------------------------
  |cht     |cursor horizontal tab             |ESC [ Pn I             |H            |
  -----------------------------------------------------------------------------------
  |ctc     |cursor tab stop control           |ESC [ Pn W             |H            |
  -----------------------------------------------------------------------------------
  |cnl     |cursor next line                  |ESC [ Pn E             |H            |
  -----------------------------------------------------------------------------------
  |cpl     |cursor preceding line             |ESC [ Pn F             |Xv, Xh, H    |
  -----------------------------------------------------------------------------------
  |cpr     |cursor position report            |ESC [ Pl; Pc R         |Xv, Xh, H, V |
  -----------------------------------------------------------------------------------
  |cub     |cursor backward                   |ESC [ Pn D             |Xv, Xh, H, V |
  -----------------------------------------------------------------------------------
  |cud     |cursor down                       |ESC [ Pn B             |Xv, Xh, H, V |
  -----------------------------------------------------------------------------------
  |cuf     |cursor forward                    |ESC [ Pn C             |Xv, Xh, H, V |
  -----------------------------------------------------------------------------------
  |cup     |cursor position                   |ESC [ Pl; Pc H         |Xv, Xh, H, V |
  -----------------------------------------------------------------------------------
  |cuu     |cursor up                         |ESC [ Pn A             |Xv, Xh, H, V |
  -----------------------------------------------------------------------------------
  |cvt     |cursor vertical tab               |ESC [ Pn Y             |H            |
  -----------------------------------------------------------------------------------
  |da1     |DEVICE ATTRIBUTES                 |                       |             |
  |        |request (host to vt100)           |ESC [ c                |Xv, Xh, V    |
  |        |request (host to vt100)           |ESC [ 0 c              |Xv, Xh, V    |
  |        |response (vt100 to host)          |ESC [ ? 1 ; 2 c        |Xv, Xh, V    |
  -----------------------------------------------------------------------------------
  |dch     |delete character                  |ESC [ Pn P             |Xv, Xh, H    |
  -----------------------------------------------------------------------------------
  |decaln  |screen alignment display          |ESC # 8                |Xv, Xh, V    |
  ----------------------------------------------------------------------------------s

  |deckpam |keypad application mode           |ESC =                  |Xv, V        |
  -----------------------------------------------------------------------------------
  |deckpnm |keypad numeric mode               |ESC >                  |Xv, V        |
  -----------------------------------------------------------------------------------
  |decrc   |restore cursor & attributes       |ESC 8                  |Xv, Xh, V    |
  -----------------------------------------------------------------------------------
  |decsc   |save cursor & attributes          |ESC 7                  |Xv, Xh, V    |
  -----------------------------------------------------------------------------------
  |decstbm |set top & bottom margins          |ESC [ Pt; Pb r         |Xv, Xh, V    |
  -----------------------------------------------------------------------------------
  |dl      |delete line                       |ESC [ Pn M             |Xv, Xh, H    |
  -----------------------------------------------------------------------------------
  |dsr     |device status report              |ESC [ Ps n             |             |
  |        | 0 response from vt100: ready     |                       |Xv, Xh, V    |
  |        | 5 command from host: please      |                       |Xv, Xh, V    |
  |        | report status                    |                       |             |
  |        | 6 command from host: report      |                       |Xv, Xh, H, V |
  |        | active position                  |                       |             |
  |        |13 error report sent from         |                       |H            |
  |        | virtual terminal to host         |                       |             |
  -----------------------------------------------------------------------------------
  |dmi     |disable manual input              |ESC ` (back quote)     |H            |
  -----------------------------------------------------------------------------------
  |emi     |enable manual input               |ESC b                  |H            |
  -----------------------------------------------------------------------------------
  |ea      |erase area                        |ESC [ Ps O             |             |
  |        |  0 erase to end of area          |                       |Xv, Xh, H    |
  |        |  1 erase from area start         |                       |Xv, Xh, H    |
  |        |  2 erase all of area             |                       |Xv, Xh, H    |
  -----------------------------------------------------------------------------------
  |ed      |erase display                     |ESC [ Ps J             |             |
  |        |  0 erase to end of display       |                       |Xv, Xh, H, V |
  |        |  1 erase from display star       |                       |Xv, Xh, H, V |
  |        |  2 erase all of display          |                       |Xv, Xh, H, V |
  -----------------------------------------------------------------------------------
  |ef      |erase field-e,s,all               |ESC [ Ps N             |             |
  |        |  0 erase to end of field         |                       |Xv, Xh, H    |
  |        |  1 erase from field start        |                       |Xv, Xh, H    |
  |        |  2 erase all of field            |                       |Xv, Xh, H    |
  -----------------------------------------------------------------------------------
  |el      |erase line                        |ESC [ Ps K             |             |
  |        |  0 erase to end of line          |                       |Xv, Xh, H, V |
  |        |  1 erase from start of line      |                       |Xv, Xh, H, V |
  |        |  2 erase all of line             |                       |Xv, Xh, H, V |
  -----------------------------------------------------------------------------------
  |ech     |erase character                   |ESC [ Pn X             |Xv, Xh, H    |
  -----------------------------------------------------------------------------------
  |hts     |horizontal tab stop               |ESC H                  |Xv, Xh, H, V |
  -----------------------------------------------------------------------------------
  |hvp     |horizontal and vertical position  |ESC [ Pl; Pc f         |Xv, Xh, H, V |
  -----------------------------------------------------------------------------------
  |ich     |insert character                  |ESC [ Pn @             |Xv, Xh, H    |
  -----------------------------------------------------------------------------------
  |il      |insert line                       |ESC [ Pn L             |Xv, Xh, H    |
  -----------------------------------------------------------------------------------
  |ind     |index                             |ESC D                  |Xv, Xh, H, V |
  -----------------------------------------------------------------------------------
  |ls2     |lock shift G2                     |ESC n                  |Xv           |
  -----------------------------------------------------------------------------------
  |ls3     |lock shift G3                     |ESC o                  |Xv           |
  -----------------------------------------------------------------------------------
  |nel     |next line                         |ESC E                  |Xv, Xh, H, V |
  -----------------------------------------------------------------------------------
  |ksi     |keyboard status information       |ESC [ Ps p             |H            |
  -----------------------------------------------------------------------------------
  |pfk     |PF key report                     |ESC [ Pn q             |Xh, H        |
  -----------------------------------------------------------------------------------
  |rcp     |restore cursor position           |ESC [ u                |Xv, Xh, H    |
  -----------------------------------------------------------------------------------
  |ri      |reverse index                     |ESC M                  |Xv, Xh, H, V |
  -----------------------------------------------------------------------------------
  |ris     |reset to initial state            |ESC c                  |Xv, Xh, H, V |
  -----------------------------------------------------------------------------------
  |rm      |reset mode, ANSI specified modes: |ESC [ Ps;...;Ps        |             |
  |        |See "set mode" below in this      |                       |             |
  |        |column.                           |                       |             |
  -----------------------------------------------------------------------------------
  |        |reset mode, other private modes   |ESC [ ? Ps;...;Ps l    |             |
  |        |and XTERM private modes: See "set |                       |             |
  |        |mode" below in this column.       |                       |             |
  -----------------------------------------------------------------------------------
  |        |restore mode, other private modes |ESC [ ? P;...;Ps r     |             |
  |        |and XTERM private modes: See "set |                       |             |
  |        |mode" below in this column.       |                       |             |
  -----------------------------------------------------------------------------------
  |        |save mode, other private modes    |ESC [ ? Ps;...;Ps s    |             |
  |        |and XTERM private modes: See "set |                       |             |
  |        |mode". below in this column.      |                       |             |
  -----------------------------------------------------------------------------------
  |scp     |save cursor postion               |ESC [ s                |Xv, Xh, H    |
  -----------------------------------------------------------------------------------
  |scs     |select character set              |                       |             |
  -----------------------------------------------------------------------------------
  |        |United Kingdom Set                |ESC ( A    (GO)        |Xv, V        |
  |        |                                  |ESC ) A    (G1)        |Xv, V        |
  |        |                                  |ESC * A    (G2)        |Xv, V        |
  |        |                                  |ESC + A    (G3)        |Xv, V        |
  -----------------------------------------------------------------------------------
  |        |ASCII Set (USASCII)               |ESC ( B    (G0)        |Xv, V        |
  |        |                                  |ESC ) B    (G1)        |Xv, V        |
  |        |                                  |ESC * B    (G2)        |Xv, V        |
  |        |                                  |ESC + B    (G3)        |Xv, V        |
  -----------------------------------------------------------------------------------
  |        |special graphics                  |ESC ( 0    (G0)        |Xv, V        |
  |        |                                  |ESC ) 0    (G1)        |Xv, V        |
  |        |                                  |ESC * 0    (G2)        |Xv, V        |
  |        |                                  |ESC + 0    (G3)        |Xv, V        |
  -----------------------------------------------------------------------------------
  |sd      |scroll down                       |ESC [ Pn T             |H            |
  -----------------------------------------------------------------------------------
  |sl      |scroll left                       |ESC [ Pn Sp @          |H            |
  -----------------------------------------------------------------------------------
  |sr      |scroll right                      |ESC [ Pn Sp A          |H            |
  -----------------------------------------------------------------------------------
  |ss2     |single shift G2                   |ESC N                  |Xv           |
  -----------------------------------------------------------------------------------
  |ss3     |single shift G3                   |ESC O                  |Xv           |
  -----------------------------------------------------------------------------------
  |su      |scroll up                         |ESC [ Pn S             |Xv, Xh, H    |
  -----------------------------------------------------------------------------------
  |sgr     |set graphic rendition             |ESC [ Ps m             |             |
  |        |  0 normal                        |                       |Xv, Xh, H, V |
  |        |  1 bold                          |                       |Xv, Xh, H, V |
  |        |  4 underscore                    |                       |Xv, Xh, H, V |
  |        |  5 blink (appears as bold)       |                       |Xv, Xh, H, V |
  |        |  7 reverse                       |                       |Xv, Xh, H, V |
  |        |  8 invisible                     |                       |Xh, H        |
  |        |  10..17 fonts                    |                       |Xh, H        |
  |        |  30..37 foreground colors        |                       |Xh, H        |
  |        |  40..47 background colors        |                       |Xh, H        |
  |        |  90..97 foreground colors        |                       |Xh, H        |
  |        | 100..107 background colors       |                       |Xh, H        |
  -----------------------------------------------------------------------------------
  |sg0a    |set GO character set              |ESC ( <                |Xh, H        |
  -----------------------------------------------------------------------------------
  |sg1a    |set G1 character set              |ESC ) <                |Xh, H        |
  -----------------------------------------------------------------------------------
  |sm      |set mode                          |                       |             |
  -----------------------------------------------------------------------------------
  |        |ANSI specified modes              |ESC [ Ps;...;Ps h      |             |
  |        |  4 IRM  insert mode              |                       |Xv, Xh, H    |
  |        | 12 SRM  send/rec mode            |                       |H            |
  |        | 18 TSM  tab stop mode            |                       |H            |
  |        | 20 LNM  linefeed/newline         |                       |Xv, Xh, H, V |
  -----------------------------------------------------------------------------------
  |        |Other private modes               |ESC [ ? Ps;...;Ps h    |             |
  |        | 1 normal/application cursor      |                       |Xv, V        |
  |        | 3 80/132 columns                 |                       |Xv, Xh, V    |
  |        | 4 smooth/jump scroll             |                       |Xv, Xh, V    |
  |        | 5  reverse/normal video          |                       |Xv, Xh, V    |
  |        | 6 origin/normal                  |                       |Xv, Xh, V    |
  |        | 7 on/off autowrap                |                       |Xv, Xh, H, V |
  |        | 8 on/off autorept                |                       |Xv, Xh, V    |
  |        | 21 CNM     CR-NL                 |                       |H            |
  -----------------------------------------------------------------------------------
  |        |XTERM private modes               |                       |             |
  |        | 40 132/80 column mode            |                       |Xv, Xh       |
  |        | 41 curses(5) fix                 |                       |Xv, Xh       |
  |        | 42 hide/show scrollbar           |                       |Xv, Xh       |
  |        | 43 on/off save scroll text       |                       |Xv, Xh       |
  |        | 44 on/off margin bell            |                       |Xv, Xh       |
  |        | 45 on/off reverse wraparound     |                       |Xv, Xh       |
  |        | 47 alternate/normal screen buffe |                       |Xv, Xh       |
  |        |                                  |                       |Xv, Xh       |
  |        | 48 reverse/normal status line    |                       |Xv, Xh       |
  |        | 49 page/normal scroll mode       |                       |             |
  -----------------------------------------------------------------------------------
  |tbc     |tabulation clear                  |ESC [ Ps g (default Ps |             |
  |        | 0 clear horizontal tab stop at   |=0)                    |Xv, Xh, H, V |
  |        | active position                  |                       |             |
  |        | 1 vertical tab at line indicated |                       |H            |
  |        | by cursor                        |                       |             |
  |        | 2 horizontal tabs on line        |                       |H            |
  |        | 3 all horizontal tabs            |                       |Xv, Xh, H, V |
  |        | 4 all vertical tabs              |                       |H            |
  -----------------------------------------------------------------------------------
  |VTD     |virtual terminal data             |ESC [ x                |Xv, Xh, H    |
  -----------------------------------------------------------------------------------
  |VTL     |virtual terminal device input     |ESC [ y                |Xh, H        |
  -----------------------------------------------------------------------------------
  |VTR     |vt raw keyboard input             |ESC [ w                |Xh, H        |
  -----------------------------------------------------------------------------------
  |vts     |vertical tab stop                 |ESC I                  |H            |
  -----------------------------------------------------------------------------------
  |xes     |erase status line                 |ESC [ ? E              |Xv, Xh       |
  -----------------------------------------------------------------------------------
  |xrs     |return from status line           |ESC [ ? F              |Xv, Xh       |
  -----------------------------------------------------------------------------------
  |xhs     |hide status line                  |ESC [ ? H              |Xv, Xh       |
  -----------------------------------------------------------------------------------
  |xss     |show status line                  |ESC [ ? S              |Xv, Xh       |
  -----------------------------------------------------------------------------------
  |xgs     |go to column of status line       |ESC [ ? Ps T           |Xv, Xh       |
  -----------------------------------------------------------------------------------
  |xst     |set text parameters               |ESC ] Ps ; Pt \007     |Xv, Xh       |
  |        | 0 change window name and         |                       |Xv, Xh       |
  |        |     title to Pt                  |                       |             |
  |        | 1  sets only the icon name       |                       |Xv, Xh       |
  |        | 2  sets only the title name      |                       |Xv, Xh       |
  -----------------------------------------------------------------------------------