home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / telecomm / ansi190 / ansiseq.txt < prev    next >
Text File  |  1992-03-27  |  16KB  |  490 lines

  1. ANSI VT-100 Escape sequences
  2.                  Compiled by Timothy Miller
  3.  
  4. This is a list of all the ANSI escape sequences that I could find.
  5. Not all of them are supported by TWS's ANSITERM, but I have marked 
  6. which ones are and which are not. 
  7.  
  8. Spaces are only for clarity.  <esc> represents ASCII #27 non-printing
  9. character.
  10.  
  11.  
  12. CPR Cursor Position Report
  13. <esc> [ Row ; Col R
  14. Terminal responce to DSR.
  15.  
  16. CUB Cursor Backwards
  17. <esc> [ n D
  18. Moves cursor n positions to the left.  If n=0, default is 1.
  19. If attempt is made to move beyond margin, cursor stops ar margin.
  20.  
  21. CUD Cursor Down
  22. <esc> [ n B
  23. Moves cursor n positions down.  If n=0, default is 1.
  24. If attempt is made to move beyond margin, cursor stops ar margin.
  25.  
  26. CUF Cursor Forward
  27. <esc> [ n C
  28. Moves cursor n positions to the right.  If n=0, default is 1.
  29. If attempt is made to move beyond margin, cursor stops ar margin.
  30.  
  31. CUU Cursor Up
  32. <esc> [ n A
  33. Moves cursor n positions up.  If n=0, default is 1.
  34. If attempt is made to move beyond margin, cursor stops ar margin.
  35.  
  36. CUP Cursor Position
  37. <esc> [ Row ; Col H
  38. Moves cursor to position on screen.  Columns numbered 1-80, Rows
  39. 1-24 unless margins set otherwise.  If parameter is 0 or missing,
  40. 1 is default.
  41.  
  42. DA Device Attributes
  43. <esc> [ n c
  44. n should be 0 or missing.  Terminal responds:
  45.    <esc> [ ? 1 ; 2 c        For ANSI/VT-100 terminal w/o printer
  46.    <esc> [ ? 1 ; 11 c        "     "           "     w/ printer
  47.  
  48. DCH Delete Characters
  49. <esc> [ n P
  50. Causes n characters to be removed from the right of the cursor,
  51. including the cursor.  ANSITERM moves the characters to the right of
  52. the deleted field to be moved left to fill in the empty space.
  53. Spaces to the right of the moved block are filled with blanks
  54. with the same character attributes as the last moved character.
  55.  
  56. DECALN Screen Alignment Display
  57. <esc> # 8
  58. Causes the screen to be filled with uppercase E's to assist in
  59. alligning the screen display.  Not supported by ANSITERM.
  60.  
  61. DECANM ANSI/VT52 Mode
  62. <esc> [ ? 2 l
  63. Causes the terminal to switch to VT-52 mode.  VT-52 is not
  64. supported by ANSITERM.
  65.  
  66. DECARM Auto Repeat Mode
  67. <esc> [ ? 8 h      (on)
  68. <esc> [ ? 8 l      (off)
  69. Turns key auto-repeat on or off.  Not supported by ANSITERM:
  70. auto-repeat is always on.
  71.  
  72. DECAWM Autowrap Mode
  73. <esc> [ ? 7 h     (on)
  74. <esc> [ ? 7 l     (off)
  75. Turns end-of-line wrap on or off.  When off, any characters 
  76. displaying at the right margin will replace any character already
  77. there.  When on, these characters appear at the beginning of
  78. the next line.
  79.  
  80. DECCKM Cursor Keys Mode
  81. <esc> [ ? 1 h        (application)
  82. <esc> [ ? 1 l        (cursor)
  83. In application mode, the cursor keys send the following codes:
  84.    left     <esc> O D
  85.    down     <esc> O B
  86.    right    <esc> O C
  87.    up       <esc> O A
  88. In cursor mode (the default), the cursor keys send:
  89.    left     <esc> [ D
  90.    down     <esc> [ B
  91.    right    <esc> [ C
  92.    up       <esc> [ A
  93.  
  94. DECCOLM Column Mode
  95. <esc> [ ? 3 h      (132 columns)
  96. <esc> [ ? 3 l      (80 columns)
  97. 132 column mode is not supported by ANSITERM.
  98.  
  99. DECDHL Double Height Line
  100. Top half:       <esc> # 3
  101. Bottom half:    <esc> # 4
  102. Causes the whole current line to change to double-width, 
  103. double-height top-half or bottom-half.  If the line was normal,
  104. all characters to the right of the center of the screen are lost.
  105. Cursor remains at the same position unless it would be placed
  106. beyond the right margin, in which case, it would be placed at
  107. the right margin.
  108. Double height is not supported by ANSITERM.
  109.  
  110. DECDWL Double Width Line
  111. <esc> # 6
  112. Causes the current line to become double-width, normal-height.
  113. If the line was normal, all characters to the right of the center 
  114. of the screen are lost.  Cursor remains at the same position 
  115. unless it would be placed beyond the right margin, in which case, 
  116. it would be placed at the right margin.
  117. Double width is not supported by ANSITERM.
  118.  
  119. DECEDM Editing Mode
  120. <esc> [ ? 10 h     (edit)
  121. <esc> [ ? 10 l     (interactive)
  122. In edit mode, characters are only sent when you press return 
  123. (I think).  Interactive mode is normal.
  124. ANSITERM does not support Editing mode.
  125.  
  126. DECEKEM Edit Key Execution Mode
  127. <esc> [ ? 16 h     (immediate)
  128. <esc> [ ? 16 l     (defer)
  129. In immediate state, if the user puts the terminal in edit mode,
  130. the host computer is told.  In the defer state, if the user attempts
  131. to put the terminal in edit mode, the host computer is asked first.
  132. ANSITERM is not an editing terminal.
  133.  
  134. DECID Identity Terminal
  135. <esc> Z
  136. Same as DA, never use this.  ANSITERM doesn't support it either.
  137.  
  138. DECINLM Interlace Mode
  139. <esc> [ ? 9 h     (on)
  140. <esc> [ ? 9 l     (off)
  141. ANSITERM ignores this command.
  142.  
  143. DECKPNM Keypad Numeric Mode
  144. <esc> >
  145. Causes the numeric keypad to send the characters which appear
  146. on the keytops.
  147.  
  148. DECKPAM Keypad Application Mode
  149. <esc> =
  150. Causes the numeric keypad to transmit the following sequences:
  151.    (PF1)           (PF2)           (PF3)           (PF4)
  152.    '(' <esc> O P   ')' <esc> O Q   '/' <esc> O R   '*' <esc> O S
  153.    '7' <esc> O w   '8' <esc> O x   '9' <esc> O y   '-' <esc> O m
  154.    '4' <esc> O t   '5' <esc> O u   '6' <esc> O v   '+' <esc> O 1
  155.    '1' <esc> O q   '2' <esc> O r   '3' <esc> O s
  156.    '0' <esc> O p                   '.' <esc> O n  ENTER <esc> O M
  157. On some terminals, there is a TAB key in place of a '+' key, and
  158. PF1 - PF4 are the top row of keys.
  159.  
  160. DECLL Load LED's
  161. <esc> [ n q
  162. Depending on n, the following action is preformed:
  163.    0    Clear LED's 1 and 2
  164.    1    Set LED 1
  165.    2    Set LED 2
  166. LED's are not supported by ANSITERM.
  167.  
  168. DECLTM Line Transmit Mode
  169. <esc> [ ? 11 h     (line)
  170. <esc> [ ? 11 l     (page)
  171. In edit mode, line, page, or partial page is transmitted by the
  172. terminal.  Edit mode is not supported by ANSITERM.
  173.  
  174. DECXMIT Transmit
  175. <esc> 5
  176. Causes the terminal to transmit the line being edited as if the
  177. user had pressed return to send it.  Edit mode is not supported
  178. by ANSITERM.
  179.  
  180. DECOM Origin Mode
  181. <esc> [ ? 6 h     (relative)
  182. <esc> [ ? 6 l     (absolute)
  183. In relative mode, cursor positions are numbered with respect with
  184. the current scrolling region.  In absolute mode, cursor positions
  185. are numbered with respect to the whole screen.
  186.  
  187. DECPRO Protected Field Attributes
  188. <esc> [ n ; ... ; n }
  189. According to n, sets the following:
  190.    0  no fields are protected
  191.    1  bold implies protection
  192.    4  underline implies protection
  193.    5  blinking implies protection
  194.    7  reverse video implies protection
  195.  254  all attributes off (normal) implies protection
  196. Since ANSITERM is not an editing terminal, it does not support
  197. field protection.
  198.  
  199. DECSC Save Cursor
  200. <esc> 7       (standard)
  201. <esc> [ s     (this must be VT-102 only)
  202. Saves current cursor position and printing attributes.  ANSITERM
  203. only saves position.
  204.  
  205. DECRC Restore Cursor
  206. <esc> 8       (standard)
  207. <esc> [ u     (this must be VT-102 only)
  208. Restores cursor to a previously stored position.
  209.  
  210. DECREQTPARM Request Terminal Parameters
  211. <esc> [ n x
  212. n will be 0 or 1.  Terminal responds with DECREPTPARM.
  213.  
  214. DECREPTPARM Report Terminal Parameters
  215. <esc> [ sol ; par ; nbits ; xspeed ; rspeed ; clkmul ; flags x
  216. Terminal's responce to DECREQTPARM.  Parameters are:
  217. sol : is DECREQTPARM's n is 0, sol = 2.  If n is 1, sol = 3
  218. par : parity:
  219.    1   none
  220.    2   space
  221.    3   mark
  222.    4   odd
  223.    5   even
  224.    ANSITERM sends 1
  225. nbits:  1 for 8 bits, 2 for 7 bits per char (default 1)
  226. xspeed, rspeed:
  227.    code    baud
  228.    0       50
  229.    8       75
  230.    16      110
  231.    24      134.5
  232.    32      150
  233.    40      200
  234.    48      300
  235.    56      600
  236.    64      1200
  237.    72      1800
  238.    80      2000
  239.    88      2400
  240.    96      3600
  241.    104     4800
  242.    112     9600
  243.    120     19200
  244. clkmul: 1   (bit rate multiplier is 16)
  245. flag: 0-15   (ignored)
  246.  
  247. DECSCFDM Space Compression/Field Delimiting Mode
  248. <esc> [ ? 13 h     (on)
  249. <esc> [ ? 13 l     (off)
  250. Sets mode for sending data in edit mode.  ANSITERM does not support
  251. edit mode.
  252.  
  253. DECSCLM Scrolling Mode
  254. <esc> [ ? 4 h     (smooth)
  255. <esc> [ ? 4 l     (jump)
  256. ANSITERM does not support smooth scrolling.
  257.  
  258. DECSCNM Screen Mode
  259. <esc> [ ? 5 h     (normal)
  260. <esc> [ ? 5 l     (reverse)
  261. In normal mode, the screen text is light on dark.  In reverse mode,
  262. the screen text is dark on light.  ANSITERM is always in normal
  263. mode.
  264.  
  265. DECSTBM Set Top and Bottom Margins
  266. <esc> [ top ; bottom r
  267. Sets top and bottom margins of scrolling region.
  268.  
  269. DECSWL Single-Width Line
  270. ESC # 5
  271. Sets current line to normal width and heigth.
  272. Not supported by ANSITERM
  273.  
  274. DECTEM Transmit Execution Mode
  275. <esc> [ ? 14 h     (immediate)
  276. <esc> [ ? 14 l     (defer)
  277. In edit mode, immediate sends line or field being edited when
  278. user presses return.  Defer mode asks the host first by sending
  279. an <esc> S sequence.  The terminal will only then send the line
  280. if the host sends a DECXMIT command.  ANSITERM does not support
  281. edit mode.
  282.  
  283. DECTST Invoke Confidence Test
  284. <esc> [ 2 ; n y
  285. Performs tests on the terminal.  n indicates the text to be done
  286. and is calculated by adding together one or more of the following
  287. values:
  288.    Power up self-test 
  289.      (EPROM and EAROM cksums, RAM test, keyboard test)        1
  290.    Data loopback test
  291.      (loopback connector required)                            2
  292.    EIA modem loopback test
  293.      (loopback connector requited)                            4
  294.    Repeat selected test(s) indefinitely
  295.      (until failure or power off)                             8
  296. ANSITERM supports none of these tests.
  297.  
  298. DECTTC Transmit Termination Character
  299. <esc> [ n |
  300. Where n is one of the following:
  301.    0                 none (function disabled)
  302.    1                 FF (form feed)
  303. ANSITERM ignores this.
  304.  
  305. DL Delete Line
  306. <esc> [ n M
  307. n lines are deleted, including the line which the cursor is on.
  308. Lines below are moved up, and new blank lines appear at the bottom.
  309.  
  310. DSR Device Status Report
  311. <esc> [ x n
  312. Where n is actually a literal n, and x is one of the following:
  313.    0     terminal responce - no malfunction
  314.    3     terminal responce - malfunction - retry
  315.    5     command from host - report status using DSR
  316.    6     command from host - report cursor position with CPR
  317. The host sends a request using options 5 or 6, and the terminal
  318. responds with "<esc> [ 0 n" or a CPR sequence, respectively.
  319.  
  320. ED Erase in Display
  321. <esc> [ n J
  322. Erases characters in the display, with n specifying one of the
  323. following:
  324.    0    Erase from the cursor position to the end of the display,
  325.           inclusive.
  326.    1    Erase from the start of the display to the cursor position,
  327.           inclusive.
  328.    2    Erase the entire display.  ANSITERM resets screen
  329.           attributes to normal, but leaves the drawing attributes
  330.           for new characters set as before.
  331.  
  332. EL Erase Line
  333. <esc> [ n K
  334. Erases characters in the line according to n:
  335.    0    Erase from the cursor position to the end of the line,
  336.           inclusive.
  337.    1    Erase from the start of the line to the cursor position,
  338.           inclusive.
  339.    2    Erase entire line.
  340.  
  341. ERM Erasure mode
  342. <esc> [ 6 h     (erase all)
  343. <esc> [ 6 l     (erase unprotected)
  344. In the reset state (erase unprotected), only unprotected characters
  345. on the screen can be cleared with ED or EL.  In the set state 
  346. (erase all), any characters on the screen can be cleared with ED
  347. or EL.  ANSITERM is not an editing terminal and does not support
  348. this.
  349.  
  350. GATM Guarded Area Transmit
  351. <esc> [ 1 h     (send all)
  352. <esc> [ 1 l     (send unprotected)
  353. In the reset state, only unprotected fields are transmitted to the
  354. host when requested (seperated by record separator when a protected
  355. field is encountered.  In the set state, all is transmitted.
  356. ANSITERM is not an editing terminal and does support this.
  357.  
  358. HTS Horizontal Tabulation Set
  359. <esc> H
  360. Sets a horizontal tab stop at the current cursor column.
  361.  
  362. HVP Horizontal and Vertical Position
  363. <esc> [ row ; col f
  364. Moves the cursor to a specified position on the screen.
  365.  
  366. IL Insert Line
  367. <esc> [ n L
  368. Moves all lines below and including the one the cursor is on down
  369. n lines, discards all lines that scroll off the bottom of the 
  370. display, and inserts blank lines into the empty space.
  371.  
  372. IND Index
  373. <esc> D
  374. Acts same as a linefeed.  Moves cursor down, maintaining the same
  375. column, and if the cursor is at the bottom of the scrolling region,
  376. a scroll up is preformed.
  377.  
  378. IRM Insert/Replacement Mode
  379. <esc> [ 4 h     (insert)
  380. <esc> [ 4 l     (replace)
  381. In insert mode, when a character is displayed all characters on the
  382. line to the right of the cursor are moved right before the character
  383. is displayed.  Any character at the right most column is discarded.
  384. In the replace mode (normal), any character at the cursor position
  385. is overwritten by any new received character.
  386.  
  387. KAM Keyboard Action Mode
  388. <esc> [ 2 h     (disabled)
  389. <esc> [ 2 l     (enabled)
  390. Enables or disables the keyboard.  ANSITERM does not support this.
  391.  
  392. LNM Line Feed/New Line Mode
  393. <esc> [ 20 h     (new line)(on)
  394. <esc> [ 20 l     (line feed)(off)
  395. In line feed mode, line feed only implies vertical movement and
  396. a carriage return is required to return to the left most column.
  397. The return key sends only a carriage return in this mode.
  398. In the new line mode, line feed implies both vertical movement and
  399. return to the left most column.  In this mode, the return key
  400. sends both carriage return and line feed.  New line mode does not
  401. affect IND or NEL.
  402.  
  403. NEL Next Line
  404. <esc> E
  405. This causes the cursor to move to the left most column of the next
  406. line.  Same as carriage return followed by line feed.
  407.  
  408. NP Next Page
  409. <esc> [ n U
  410. Causes the nth page down to be displayed.  ANSITERM does not support
  411. more than one display page.
  412.  
  413. RI Reverse Index
  414. <esc> M
  415. Causes the cursor to move to the same column of the preceding line.
  416. If the cursor is at the top of the scrolling region, a scroll down
  417. if preformed.
  418.  
  419. RIS To Initial State
  420. <esc> c
  421. Resets the terminal to its power up state.
  422.  
  423. RM Reset Mode
  424. <esc> [ n; n; n; ... n l
  425. Resets one or more modes specified by each individual n.  See
  426. above sequences for examples of RM sequences.
  427.  
  428. SCS Select Character Set
  429. Selects a character set.  One of two sets may be selected quickly
  430. after being set with the following sequences:
  431. Shift In (Ctrl-N)  Shift Out (Ctrl-O)
  432.  <esc>(A            <esc>)A             United Kingdom
  433.  <esc>(B            <esc>)B             Ascii
  434.  <esc>(0            <esc>)0             Business Graphics
  435. Any selection other than A, B, or 0 will default to Ascii.
  436. ANSITERM supports only Ascii and IBMECGS character sets.
  437.  
  438. SGR Select Graphics Rendition
  439. <esc> [ n; ... n m
  440. This sequence sets one or more character drawing attribute according
  441. to the following table:
  442. VT-100 Commands
  443.       n            Meaning
  444.       0            all attributes off
  445.       1            bold
  446.       4            underline (NOW supported by ANSITERM)
  447.       5            blink (IS supported by ANSITERM)
  448.       7            reverse video
  449. VT-102 Commands
  450.       30+c         foreground color
  451.       40+c         background color
  452. where c is one of the following:
  453.       0            black
  454.       1            red
  455.       2            green
  456.       3            brown/yellow
  457.       4            blue
  458.       5            magenta
  459.       6            cyan
  460.       7            grey/white
  461.  
  462. SM Set Mode
  463. <esc> [ n; ... ; n h
  464. Sets one or more modes specified by each individual n.  See
  465. above sequences for examples of SM sequences.
  466.  
  467. TBC Tabulation Clear
  468. <esc> [ n g
  469. Clears horizontal tab stops according to n:
  470.    0     clear tab at cursor position
  471.    3     clear all tabs
  472.  
  473. TTM Transfer Termination Mode
  474. <esc> [ 16 h     (page)
  475. <esc> [ 16 l     (partial page)
  476. This is an edit mode command.  In the set state, the entire scrolling
  477. region is transmitted.  In the reset state, all characters from the
  478. beginning of the scrolling region or the last partial page, to (but
  479. not including) the cursor position are transmitted.
  480. ANSITERM is not an editing terminal.
  481.  
  482. Here's one I didn't find until I picked it out of my capture buffer:
  483. ??? Insert Char
  484. <esc> [ n @
  485. This is what one version of SearchLight BBS sends when it's trying
  486. to insert a character.  I'm just assuming that you can add that
  487. optional n parameter to specify how many characters to insert.
  488. What I actually found was just an <esc>[@ where it unsuccessfully
  489. tried to insert.
  490.