vt100.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Wed, 05 Aug 2015 23:55:34 +0300
changeset 1729 22ffd80639c0
parent 1334 9bf0d5a1f0cf
child 1905 fba288d59662
permissions -rw-r--r--
Make centered content design with adoption for mobile devices. Highlight TOC.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1334
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1032
diff changeset
     1
.. -*- coding: utf-8; -*-
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1032
diff changeset
     2
.. include:: HEADER.rst
953
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     3
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     4
==========================================================
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     5
 This document describes how to control a VT100 terminal.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     6
==========================================================
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     7
.. contents::
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     8
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     9
ANSI escape sequence is a sequence of ASCII characters, the first two of which
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    10
are the ASCII "Escape" character 27 (1Bh) and the left-bracket character " [ "
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    11
(5Bh). The character or characters following the escape and left-bracket
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    12
characters specify an alphanumeric code that controls a keyboard or display
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    13
function.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    14
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    15
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    16
|Esc[2;1yEsc[20h |Confidence power up testSet new line   |DECTSTLMN    |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    17
|                |mode                                   |             |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    18
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    19
|Esc[2;2yEsc[?1h |Confidence loopback testSet cursor key |DECTSTDECCKM |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    20
|                |to application                         |             |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    21
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    22
|Esc[2;9ynone    |Repeat power up testSet ANSI (versus   |DECTSTDECANM |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    23
|                |VT52)                                  |             |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    24
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    25
|Esc[2;10yEsc[?3h|Repeat loopback testSet number of      |DECTSTDECCOLM|
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    26
|                |columns to 132                         |             |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    27
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    28
|Esc[0qEsc[?4h   |Turn off all four ledsSet smooth       |DECLL0DECSCLM|
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    29
|                |scrolling                              |             |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    30
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    31
|Esc[1qEsc[?5h   |Turn on LED #1Set reverse video on     |DECLL1DECSCNM|
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    32
|                |screen                                 |             |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    33
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    34
|Esc[2qEsc[?6h   |Turn on LED #2Set origin to relative   |DECLL2DECOM  |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    35
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    36
|Esc[3qEsc[?7h   |Turn on LED #3Set auto-wrap mode       |DECLL3DECAWM |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    37
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    38
|Esc[4qEsc[?8h   |Turn on LED #4Set auto-repeat mode     |DECLL4DECARM |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    39
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    40
|Esc[?9h         |Set interlacing mode                   |DECINLM      |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    41
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    42
|Esc[20l         |Set line feed mode                     |LMN          |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    43
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    44
|Esc[?1l         |Set cursor key to cursor               |DECCKM       |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    45
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    46
|Esc[?2l         |Set VT52 (versus ANSI)                 |DECANM       |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    47
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    48
|Esc[?3l         |Set number of columns to 80            |DECCOLM      |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    49
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    50
|Esc[?4l         |Set jump scrolling                     |DECSCLM      |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    51
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    52
|Esc[?5l         |Set normal video on screen             |DECSCNM      |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    53
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    54
|Esc[?6l         |Set origin to absolute                 |DECOM        |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    55
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    56
|Esc[?7l         |Reset auto-wrap mode                   |DECAWM       |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    57
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    58
|Esc[?8l         |Reset auto-repeat mode                 |DECARM       |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    59
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    60
|Esc[?9l         |Reset interlacing mode                 |DECINLM      |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    61
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    62
|Esc=            |Set alternate keypad mode              |DECKPAM      |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    63
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    64
|Esc>            |Set numeric keypad mode                |DECKPNM      |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    65
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    66
|Esc(A           |Set United Kingdom G0 character set    |setukg0      |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    67
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    68
|Esc)A           |Set United Kingdom G1 character set    |setukg1      |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    69
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    70
|Esc(B           |Set United States G0 character set     |setusg0      |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    71
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    72
|Esc)B           |Set United States G1 character set     |setusg1      |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    73
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    74
|Esc(0           |Set G0 special chars. & line set       |setspecg0    |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    75
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    76
|Esc)0           |Set G1 special chars. & line set       |setspecg1    |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    77
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    78
|Esc(1           |Set G0 alternate character ROM         |setaltg0     |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    79
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    80
|Esc)1           |Set G1 alternate character ROM         |setaltg1     |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    81
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    82
|Esc(2           |Set G0 alt char ROM and spec. graphics |setaltspecg0 |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    83
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    84
|Esc)2           |Set G1 alt char ROM and spec. graphics |setaltspecg1 |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    85
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    86
|EscN            |Set single shift 2                     |SS2          |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    87
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    88
|EscO            |Set single shift 3                     |SS3          |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    89
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    90
|Esc[m           |Turn off character attributes          |SGR0         |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    91
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    92
|Esc[0m          |Turn off character attributes          |SGR0         |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    93
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    94
|Esc[1m          |Turn bold mode on                      |SGR1         |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    95
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    96
|Esc[2m          |Turn low intensity mode on             |SGR2         |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    97
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    98
|Esc[4m          |Turn underline mode on                 |SGR4         |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    99
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   100
|Esc[5m          |Turn blinking mode on                  |SGR5         |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   101
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   102
|Esc[7m          |Turn reverse video on                  |SGR7         |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   103
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   104
|Esc[8m          |Turn invisible text mode on            |SGR8         |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   105
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   106
|Esc[Line;Liner  |Set top and bottom lines of a window   |DECSTBM      |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   107
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   108
|Esc[ValueA      |Move cursor up n lines                 |CUU          |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   109
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   110
|Esc[ValueB      |Move cursor down n lines               |CUD          |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   111
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   112
|Esc[ValueC      |Move cursor right n lines              |CUF          |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   113
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   114
|Esc[ValueD      |Move cursor left n lines               |CUB          |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   115
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   116
|Esc[H           |Move cursor to upper left corner       |cursorhome   |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   117
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   118
|Esc[;H          |Move cursor to upper left corner       |cursorhome   |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   119
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   120
|Esc[Line;ColumnH|Move cursor to screen location v,h     |CUP          |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   121
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   122
|Esc[f           |Move cursor to upper left corner       |hvhome       |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   123
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   124
|Esc[;f          |Move cursor to upper left corner       |hvhome       |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   125
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   126
|Esc[Line;Columnf|Move cursor to screen location v,h     |CUP          |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   127
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   128
|EscD            |Move/scroll window up one line         |IND          |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   129
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   130
|EscM            |Move/scroll window down one line       |RI           |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   131
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   132
|EscE            |Move to next line                      |NEL          |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   133
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   134
|Esc7            |Save cursor position and attributes    |DECSC        |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   135
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   136
|Esc8            |Restore cursor position and attributes |DECSC        |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   137
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   138
|EscH            |Set a tab at the current column        |HTS          |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   139
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   140
|Esc[g           |Clear a tab at the current column      |TBC          |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   141
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   142
|Esc[0g          |Clear a tab at the current column      |TBC          |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   143
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   144
|Esc[3g          |Clear all tabs                         |TBC          |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   145
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   146
|Esc#3           |Double-height letters, top half        |DECDHL       |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   147
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   148
|Esc#4           |Double-height letters, bottom half     |DECDHL       |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   149
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   150
|Esc#5           |Single width, single height letters    |DECSWL       |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   151
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   152
|Esc#6           |Double width, single height letters    |DECDWL       |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   153
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   154
|Esc[K           |Clear line from cursor right           |EL0          |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   155
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   156
|Esc[0K          |Clear line from cursor right           |EL0          |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   157
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   158
|Esc[1K          |Clear line from cursor left            |EL1          |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   159
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   160
|Esc[2K          |Clear entire line                      |EL2          |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   161
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   162
|Esc[J           |Clear screen from cursor down          |ED0          |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   163
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   164
|Esc[0J          |Clear screen from cursor down          |ED0          |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   165
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   166
|Esc[1J          |Clear screen from cursor up            |ED1          |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   167
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   168
|Esc[2J          |Clear entire screen                    |ED2          |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   169
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   170
|Esc5n           |Device status report                   |DSR          |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   171
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   172
|Esc0n           |Response: terminal is OK               |DSR          |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   173
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   174
|EscLine;ColumnR |Response: cursor is at v,h             |CPR          |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   175
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   176
|Esc[c           |Identify what terminal type            |DA           |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   177
+----------------+---------------------------------------+-------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   178
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   179
Codes for use in VT52 compatibility mode
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   180
========================================
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   181
+-------------+-------------------------------------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   182
|Esc<         |Enter/exit ANSI mode (VT52) setansi        |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   183
+-------------+-------------------------------------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   184
|Esc=         |Enter alternate keypad mode altkeypad      |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   185
+-------------+-------------------------------------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   186
|Esc>         |Exit alternate keypad mode numkeypad       |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   187
+-------------+-------------------------------------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   188
|EscF         |Use special graphics character set setgr   |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   189
+-------------+-------------------------------------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   190
|EscG         |Use normal US/UK character set resetgr     |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   191
+-------------+-------------------------------------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   192
|EscA         |Move cursor up one line cursorup           |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   193
+-------------+-------------------------------------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   194
|EscB         |Move cursor down one line cursordn         |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   195
+-------------+-------------------------------------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   196
|EscC         |Move cursor right one char cursorrt        |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   197
+-------------+-------------------------------------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   198
|EscD         |Move cursor left one char cursorlf         |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   199
+-------------+-------------------------------------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   200
|EscH         |Move cursor to upper left corner cursorhome|
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   201
+-------------+-------------------------------------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   202
|EscLineColumn|Move cursor to v,h location cursorpos(v,h) |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   203
+-------------+-------------------------------------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   204
|EscI         |Generate a reverse line-feed revindex      |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   205
+-------------+-------------------------------------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   206
|EscK         |Erase to end of current line cleareol      |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   207
+-------------+-------------------------------------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   208
|EscJ         |Erase to end of screen cleareos            |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   209
+-------------+-------------------------------------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   210
|EscZ         |Identify what the terminal is ident        |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   211
+-------------+-------------------------------------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   212
|Esc/Z        |Correct response to ident identresp        |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   213
+-------------+-------------------------------------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   214
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   215
VT100 Special Key Codes
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   216
=======================
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   217
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   218
These are sent from the terminal back to the computer when the particular key is pressed. Note that the numeric keypad keys send different codes in numeric mode than in alternate mode. See escape codes above to change keypad mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   219
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   220
Function Keys:
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   221
==============
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   222
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   223
+-----+---+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   224
|EscOP|PF1|
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   225
+-----+---+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   226
|EscOQ|PF2|
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   227
+-----+---+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   228
|EscOR|PF3|
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   229
+-----+---+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   230
|EscOS|PF4|
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   231
+-----+---+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   232
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   233
Arrow Keys:
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   234
===========
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   235
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   236
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   237
+-----+-----+-----+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   238
|     |Reset|Set  |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   239
+-----+-----+-----+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   240
|up   |EscA |EscOA|
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   241
+-----+-----+-----+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   242
|down |EscB |EscOB|
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   243
+-----+-----+-----+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   244
|right|EscC |EscOC|
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   245
+-----+-----+-----+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   246
|left |EscD |EscOD|
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   247
+-----+-----+-----+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   248
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   249
Numeric Keypad Keys:
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   250
====================
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   251
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   252
+-----+---------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   253
|EscOp|0        |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   254
+-----+---------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   255
|EscOq|1        |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   256
+-----+---------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   257
|EscOr|2        |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   258
+-----+---------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   259
|EscOs|3        |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   260
+-----+---------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   261
|EscOt|4        |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   262
+-----+---------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   263
|EscOu|5        |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   264
+-----+---------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   265
|EscOv|6        |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   266
+-----+---------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   267
|EscOw|7        |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   268
+-----+---------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   269
|EscOx|8        |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   270
+-----+---------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   271
|EscOy|9        |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   272
+-----+---------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   273
|EscOm|-(minus) |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   274
+-----+---------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   275
|EscOl|,(comma) |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   276
+-----+---------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   277
|EscOn|.(period)|
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   278
+-----+---------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   279
|EscOM|^M       |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   280
+-----+---------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   281
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   282
Printing:
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   283
=========
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   284
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   285
+------+------------+--------------------------------------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   286
|Esc[i |Print Screen|Print the current screen                    |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   287
+------+------------+--------------------------------------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   288
|Esc[1i|Print Line  |Print the current line                      |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   289
+------+------------+--------------------------------------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   290
|Esc[4i|Stop Print  |Disable log                                 |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   291
+------+------------+--------------------------------------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   292
|Esc[5i|Start Print |Start log; all received text is echoed to a |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   293
|      |            |                  printer                   |
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   294
+------+------------+--------------------------------------------+
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   295