VT100 commands.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. <html data-lt-installed="true"><head>
  2. <meta http-equiv="content-type" content="text/html; charset=windows-1252">
  3. <title>VT100 commands</title><style id="_fc_">[d__],[d__][style]{color:rgba(0, 0, 0, 1)!important}::placeholder{opacity:1!important;}[b__]{border:1px solid black!important}</style></head>
  4. <body bgcolor="#ffffff">
  5. <center>
  6. <h1>VT100 commands and control sequences</h1>
  7. edited by <a href="http://astronomy.swin.edu.au/%7Epbourke/dataformats/">Paul Bourke</a>
  8. </center>
  9. <p></p><hr><p>
  10. </p><pre>The following are the VT100 commands as described by the
  11. Digital VT101 Video Terminal User Guide (EK-VT101-UG-003). An
  12. asterik (*) beside the function indicate that it is currently
  13. supported. A plus (+) means the function is trapped and ignored.
  14. Scrolling Functions:
  15. * ESC [ pt ; pb r set scroll region
  16. * ESC [ ? 6 h turn on region - origin mode
  17. * ESC [ ? 6 l turn off region - full screen mode
  18. Cursor Functions:
  19. * ESC [ pn A cursor up pn times - stop at top
  20. * ESC [ pn B cursor down pn times - stop at bottom
  21. * ESC [ pn C cursor right pn times - stop at far right
  22. * ESC [ pn D cursor left pn times - stop at far left
  23. * ESC [ pl ; pc H set cursor position - pl Line, pc Column
  24. * ESC [ H set cursor home
  25. * ESC [ pl ; pc f set cursor position - pl Line, pc Column
  26. * ESC [ f set cursor home
  27. * ESC D cursor down - at bottom of region, scroll up
  28. * ESC M cursor up - at top of region, scroll down
  29. * ESC E next line (same as CR LF)
  30. * ESC 7 save cursor position(char attr,char set,org)
  31. * ESC 8 restore position (char attr,char set,origin)
  32. Applications / Normal Mode:
  33. * ESC [ ? 1 h cursor keys in applications mode
  34. * ESC [ ? 1 l cursor keys in cursor positioning mode
  35. * ESC = keypad keys in applications mode
  36. * ESC &gt; keypad keys in numeric mode
  37. Character Sets:
  38. * ESC ( A UK char set as G0
  39. * ESC ( B US char set as G0
  40. * ESC ( 0 line char set as G0
  41. * ESC ) A UK char set as G1
  42. * ESC ) B US char set as G1
  43. * ESC ) 0 line char set as G1
  44. * ESC N select G2 set for next character only
  45. * ESC O select G3 set for next character only
  46. Character Attributes:
  47. * ESC [ m turn off attributes - normal video
  48. * ESC [ 0 m turn off attributes - normal video
  49. !* ESC [ 4 m turn on underline mode
  50. * ESC [ 7 m turn on inverse video mode
  51. * ESC [ 1 m highlight
  52. * ESC [ 5 m blink
  53. ! On color systems underlined characters are displayed in blue
  54. Line Attributes:
  55. + ESC # 3 double high (top half) - double wide
  56. + ESC # 4 double high (bottom half) - double wide
  57. + ESC # 5 single wide - single height
  58. + ESC # 6 double wide - single height
  59. Erasing:
  60. * ESC [ K erase to end of line (inclusive)
  61. * ESC [ 0 K erase to end of line (inclusive)
  62. * ESC [ 1 K erase to beginning of line (inclusive)
  63. * ESC [ 2 K erase entire line (cursor doesn't move)
  64. * ESC [ J erase to end of screen (inclusive)
  65. * ESC [ 0 J erase to end of screen (inclusive)
  66. * ESC [ 1 J erase to beginning of screen (inclusive)
  67. * ESC [ 2 J erase entire screen (cursor doesn't move)
  68. Tabulation:
  69. * ESC H set tab in current position
  70. * ESC [ g clear tab stop in current position
  71. * ESC [ 0 g clear tab stop in current position
  72. * ESC [ 3 g clear all tab stops
  73. Printing:
  74. * ESC [ i print page
  75. * ESC [ 0 i print page
  76. * ESC [ 1 i print line
  77. * ESC [ ? 4 i auto print off
  78. * ESC [ ? 5 i auto print on
  79. + ESC [ 4 i print controller off
  80. + ESC [ 5 i print controller on
  81. Requests / Reports:
  82. * ESC [ 5 n request for terminal status
  83. ESC [ 0 n report - no malfunction
  84. * ESC [ 6 n request for cursor position report
  85. ESC [ pl;pc R report - cursor at line pl, &amp; column pc
  86. * ESC [ ? 1 5 n request printer status
  87. ESC [ ? 1 0 n report - printer ready
  88. * ESC [ c request to identify terminal type
  89. * ESC [ 0 c request to identify terminal type
  90. * ESC Z request to identify terminal type
  91. ESC [ ? 1;0 c report - type VT100
  92. Initialization / Tests:
  93. + ESC c reset to initial state
  94. + ESC [ 2 ; 1 y power up test
  95. + ESC [ 2 ; 2 y loop back test
  96. + ESC [ 2 ; 9 y power up test till failure or power down
  97. + ESC [ 2 ; 10 y loop back test till failure or power down
  98. + ESC # 8 video alignment test-fill screen with E's
  99. Setup Functions:
  100. + ESC [ ? 2 l enter VT52 mode
  101. + ESC &lt; exit VT52 mode
  102. + ESC [ ? 3 h 132 column mode
  103. + ESC [ ? 3 l 80 column mode
  104. + ESC [ ? 4 h smooth scroll
  105. + ESC [ ? 4 l jump scroll
  106. * ESC [ ? 5 h black characters on white screen mode
  107. * ESC [ ? 5 l white characters on black screen mode
  108. * ESC [ ? 7 h auto wrap to new line
  109. * ESC [ ? 7 l auto wrap off
  110. + ESC [ ? 8 h keyboard auto repeat mode on
  111. + ESC [ ? 8 l keyboard auto repeat mode off
  112. + ESC [ ? 9 h 480 scan line mode
  113. + ESC [ ? 9 l 240 scan line mode
  114. * ESC [ ? 1 8 h print form feed on
  115. * ESC [ ? 1 8 l print form feed off
  116. * ESC [ ? 1 9 h print whole screen
  117. * ESC [ ? 1 9 l print only scroll region
  118. + ESC [ 2 0 h newline mode LF, FF, VT, CR = CR/LF)
  119. + ESC [ 2 0 l line feed mode (LF, FF, VT = LF ; CR = CR)
  120. LED Functions:
  121. !* ESC [ 0 q turn off LED 1-4
  122. !* ESC [ 1 q turn on LED #1
  123. !* ESC [ 2 q turn on LED #2
  124. !* ESC [ 3 q turn on LED #3
  125. !* ESC [ 4 q turn on LED #4
  126. ! The bottom line of the screen is used as a status line by the
  127. VT100 emulation. The information on the bottom line is:
  128. 1) the status of the four VT100 LED's
  129. 2) the status of the numeric keypad (application mode /normal mode)
  130. 3) the status of the cursor keypad (application mode/normal mode)
  131. Interpreted Control Characters:
  132. * ^O shift in - selects G0 character set
  133. * ^N shift out - selects G1 character set
  134. VT100 KEYBOARD MAP
  135. The following table describes the special function keys of the
  136. VT100 and shows the transmitted sequences. It also shows the key
  137. or key sequence required to produce this function on the IBM-PC
  138. keyboard. The VT100 has four function keys PF1 - PF4, four arrow
  139. keys, and a numeric keypad with 0-9, ".", "-", RETURN and ",".
  140. The numeric keypad and the arrow keys may be in standard mode or
  141. applications mode as set by the host computer. Sequences will be
  142. sent as follows:
  143. To Get Press Key on
  144. VT100 Key Standard Applications IBM Keypad
  145. =====================================================
  146. NUMLOK - On
  147. Keypad:
  148. 0 0 ESC O p 0
  149. 1 1 ESC O q 1
  150. 2 2 ESC O r 2
  151. 3 3 ESC O s 3
  152. 4 4 ESC O t 4
  153. 5 5 ESC O u 5
  154. 6 6 ESC O v 6
  155. 7 7 ESC O w 7
  156. 8 8 ESC O x 8
  157. 9 9 ESC O y 9
  158. - - ESC O m -
  159. , , ESC O l * (on PrtSc key)
  160. . . ESC O n .
  161. Return Return ESC O M +
  162. NUMLOK - Off
  163. Arrows:
  164. Up ESC [ A ESC O A Up
  165. Down ESC [ B ESC O B Down
  166. Right ESC [ C ESC O C Right
  167. Left ESC [ D ESC O D Left
  168. Up ESC [ A ESC O A Alt 9
  169. Down ESC [ B ESC O B Alt 0
  170. Right ESC [ C ESC O C Alt -
  171. Left ESC [ D ESC O D Alt =
  172. Note that either set of keys may be used to send VT100 arrow keys.
  173. The Alt 9,0,-, and = do not require NumLok to be off.
  174. Functions:
  175. PF1 - Gold ESC O P ESC O P F1
  176. PF2 - Help ESC O Q ESC O Q F2
  177. PF3 - Next ESC O R ESC O R F3
  178. PF4 - DelBrk ESC O S ESC O S F4
  179. Please note that the backspace key transmits an ascii DEL
  180. (character 127) while in VT100 emulation. To get a true ascii
  181. backspace (character 8) you must press control-backspace.
  182. </pre>
  183. <deepl-input-controller translate="no"></deepl-input-controller><div style="border-block-style: unset; border-inline: unset; border-end-end-radius: unset; border-end-start-radius: unset; border-start-end-radius: unset; border-start-start-radius: unset; border-block-width: unset; border-block-color: unset; overflow-block: unset; overflow-inline: unset; overscroll-behavior-block: unset; overscroll-behavior-inline: unset; margin-block: unset; margin-inline: unset; scroll-margin-block: unset; scroll-margin-inline: unset; padding-block: unset; padding-inline: unset; scroll-padding-block: unset; scroll-padding-inline: unset; contain-intrinsic-block-size: unset; contain-intrinsic-inline-size: unset; max-block-size: unset; max-inline-size: unset; inset-block: unset; inset-inline: unset; block-size: unset; inline-size: unset; min-block-size: unset; min-inline-size: unset; background: unset; background-blend-mode: unset; border: unset; box-decoration-break: unset; -moz-float-edge: unset; border-radius: unset; vertical-align: unset; backface-visibility: unset; break-inside: unset; clear: unset; contain: unset; container: unset; content-visibility: unset; display: unset; float: unset; isolation: unset; -moz-orient: unset; overflow-anchor: unset; position: absolute; resize: unset; scroll-behavior: unset; scroll-snap-align: unset; scroll-snap-stop: unset; scroll-snap-type: unset; scrollbar-gutter: unset; touch-action: unset; transform-box: unset; transform-style: unset; appearance: unset; break-after: unset; break-before: unset; overflow: unset; overscroll-behavior: unset; anchor-name: unset; offset: unset; perspective: unset; rotate: unset; scale: unset; shape-outside: unset; transform-origin: unset; translate: unset; -webkit-line-clamp: unset; will-change: unset; zoom: unset; perspective-origin: unset; anchor-scope: unset; transform: unset; shape-image-threshold: unset; shape-margin: unset; column-fill: unset; column-span: unset; column-rule: unset; columns: unset; content: unset; counter-increment: unset; counter-reset: unset; counter-set: unset; mix-blend-mode: unset; backdrop-filter: unset; box-shadow: unset; clip: unset; filter: unset; opacity: unset; font: unset; font-synthesis: unset; math-shift: unset; math-style: unset; font-palette: unset; math-depth: unset; dominant-baseline: unset; image-orientation: unset; image-rendering: unset; print-color-adjust: unset; text-orientation: unset; visibility: unset; writing-mode: unset; color-interpolation: unset; color-interpolation-filters: unset; paint-order: unset; shape-rendering: unset; stroke-linecap: unset; stroke-linejoin: unset; text-anchor: unset; clip-rule: unset; fill-rule: unset; stroke-dasharray: unset; stroke-dashoffset: unset; stroke-width: unset; fill: unset; stroke: unset; fill-opacity: unset; stroke-opacity: unset; marker: unset; stroke-miterlimit: unset; border-collapse: unset; caption-side: unset; empty-cells: unset; border-spacing: unset; forced-color-adjust: unset; hyphens: unset; line-break: unset; -moz-text-size-adjust: unset; overflow-wrap: unset; ruby-align: unset; ruby-position: unset; text-align: unset; text-align-last: unset; text-autospace: unset; text-combine-upright: unset; text-decoration-skip-ink: unset; text-emphasis-position: unset; text-justify: unset; text-rendering: unset; text-transform: unset; text-underline-position: unset; text-wrap: unset; -webkit-text-security: unset; white-space: unset; word-break: unset; color: unset; hyphenate-character: unset; hyphenate-limit-chars: unset; letter-spacing: unset; tab-size: unset; text-emphasis: unset; text-indent: unset; text-shadow: unset; text-underline-offset: unset; -webkit-text-stroke: unset; word-spacing: unset; -webkit-text-fill-color: unset; pointer-events: unset; accent-color: unset; caret-color: unset; color-scheme: unset; cursor: unset; scrollbar-color: unset; list-style: unset; quotes: unset; overflow-clip-margin: unset; margin: unset; scroll-margin: unset; outline: unset; outline-offset: unset; padding: unset; scroll-padding: unset; page: unset; place-items: unset; box-sizing: unset; flex-flow: unset; grid: unset; masonry-auto-flow: unset; object-fit: unset; position-area: unset; position-try: unset; position-visibility: unset; place-content: unset; place-self: unset; aspect-ratio: unset; flex: unset; position-anchor: unset; z-index: unset; object-position: unset; gap: unset; order: unset; contain-intrinsic-size: unset; grid-area: unset; max-height: unset; max-width: unset; bottom: unset; left: 0px; right: unset; top: 0px; height: unset; min-height: unset; min-width: unset; width: unset; mask-type: unset; vector-effect: unset; clip-path: unset; d: unset; mask: unset; cx: unset; cy: unset; x: unset; y: unset; flood-opacity: unset; stop-opacity: unset; r: unset; rx: unset; ry: unset; flood-color: unset; lighting-color: unset; stop-color: unset; table-layout: unset; text-decoration: unset; text-decoration-inset: unset; text-overflow: unset; field-sizing: unset; ime-mode: unset; scrollbar-width: unset; user-select: unset; -moz-force-broken-image-icon: unset; animation-composition: unset; animation: unset; scroll-timeline: unset; transition: unset; view-timeline: unset; view-timeline-inset: unset; view-transition-class: unset; view-transition-name: unset; timeline-scope: unset; -moz-box-align: unset; -moz-box-direction: unset; -moz-box-orient: unset; -moz-box-pack: unset; -moz-box-ordinal-group: unset; -moz-box-flex: unset;"><div style="border-block-style: unset; border-inline: unset; border-end-end-radius: unset; border-end-start-radius: unset; border-start-end-radius: unset; border-start-start-radius: unset; border-block-width: unset; border-block-color: unset; overflow-block: unset; overflow-inline: unset; overscroll-behavior-block: unset; overscroll-behavior-inline: unset; margin-block: unset; margin-inline: unset; scroll-margin-block: unset; scroll-margin-inline: unset; padding-block: unset; padding-inline: unset; scroll-padding-block: unset; scroll-padding-inline: unset; contain-intrinsic-block-size: unset; contain-intrinsic-inline-size: unset; max-block-size: unset; max-inline-size: unset; inset-block: unset; inset-inline: unset; block-size: unset; inline-size: unset; min-block-size: unset; min-inline-size: unset; background: unset; background-blend-mode: unset; border: unset; box-decoration-break: unset; -moz-float-edge: unset; border-radius: unset; vertical-align: unset; backface-visibility: unset; break-inside: unset; clear: unset; contain: unset; container: unset; content-visibility: unset; display: unset; float: unset; isolation: unset; -moz-orient: unset; overflow-anchor: unset; position: absolute; resize: unset; scroll-behavior: unset; scroll-snap-align: unset; scroll-snap-stop: unset; scroll-snap-type: unset; scrollbar-gutter: unset; touch-action: unset; transform-box: unset; transform-style: unset; appearance: unset; break-after: unset; break-before: unset; overflow: unset; overscroll-behavior: unset; anchor-name: unset; offset: unset; perspective: unset; rotate: unset; scale: unset; shape-outside: unset; transform-origin: unset; translate: unset; -webkit-line-clamp: unset; will-change: unset; zoom: unset; perspective-origin: unset; anchor-scope: unset; transform: unset; shape-image-threshold: unset; shape-margin: unset; column-fill: unset; column-span: unset; column-rule: unset; columns: unset; content: unset; counter-increment: unset; counter-reset: unset; counter-set: unset; mix-blend-mode: unset; backdrop-filter: unset; box-shadow: unset; clip: unset; filter: unset; opacity: unset; font: unset; font-synthesis: unset; math-shift: unset; math-style: unset; font-palette: unset; math-depth: unset; dominant-baseline: unset; image-orientation: unset; image-rendering: unset; print-color-adjust: unset; text-orientation: unset; visibility: unset; writing-mode: unset; color-interpolation: unset; color-interpolation-filters: unset; paint-order: unset; shape-rendering: unset; stroke-linecap: unset; stroke-linejoin: unset; text-anchor: unset; clip-rule: unset; fill-rule: unset; stroke-dasharray: unset; stroke-dashoffset: unset; stroke-width: unset; fill: unset; stroke: unset; fill-opacity: unset; stroke-opacity: unset; marker: unset; stroke-miterlimit: unset; border-collapse: unset; caption-side: unset; empty-cells: unset; border-spacing: unset; forced-color-adjust: unset; hyphens: unset; line-break: unset; -moz-text-size-adjust: unset; overflow-wrap: unset; ruby-align: unset; ruby-position: unset; text-align: unset; text-align-last: unset; text-autospace: unset; text-combine-upright: unset; text-decoration-skip-ink: unset; text-emphasis-position: unset; text-justify: unset; text-rendering: unset; text-transform: unset; text-underline-position: unset; text-wrap: unset; -webkit-text-security: unset; white-space: unset; word-break: unset; color: unset; hyphenate-character: unset; hyphenate-limit-chars: unset; letter-spacing: unset; tab-size: unset; text-emphasis: unset; text-indent: unset; text-shadow: unset; text-underline-offset: unset; -webkit-text-stroke: unset; word-spacing: unset; -webkit-text-fill-color: unset; pointer-events: unset; accent-color: unset; caret-color: unset; color-scheme: unset; cursor: unset; scrollbar-color: unset; list-style: unset; quotes: unset; overflow-clip-margin: unset; margin: unset; scroll-margin: unset; outline: unset; outline-offset: unset; padding: unset; scroll-padding: unset; page: unset; place-items: unset; box-sizing: unset; flex-flow: unset; grid: unset; masonry-auto-flow: unset; object-fit: unset; position-area: unset; position-try: unset; position-visibility: unset; place-content: unset; place-self: unset; aspect-ratio: unset; flex: unset; position-anchor: unset; z-index: unset; object-position: unset; gap: unset; order: unset; contain-intrinsic-size: unset; grid-area: unset; max-height: unset; max-width: unset; bottom: unset; left: 0px; right: unset; top: 0px; height: unset; min-height: unset; min-width: unset; width: unset; mask-type: unset; vector-effect: unset; clip-path: unset; d: unset; mask: unset; cx: unset; cy: unset; x: unset; y: unset; flood-opacity: unset; stop-opacity: unset; r: unset; rx: unset; ry: unset; flood-color: unset; lighting-color: unset; stop-color: unset; table-layout: unset; text-decoration: unset; text-decoration-inset: unset; text-overflow: unset; field-sizing: unset; ime-mode: unset; scrollbar-width: unset; user-select: unset; -moz-force-broken-image-icon: unset; animation-composition: unset; animation: unset; scroll-timeline: unset; transition: unset; view-timeline: unset; view-timeline-inset: unset; view-transition-class: unset; view-transition-name: unset; timeline-scope: unset; -moz-box-align: unset; -moz-box-direction: unset; -moz-box-orient: unset; -moz-box-pack: unset; -moz-box-ordinal-group: unset; -moz-box-flex: unset;"></div></div></body></html>