User Tools

Site Tools


eric:computer:bash:shell_scripting:shell.scripting.vt100.manual

This is an old revision of the document!


Title: Shell.Scripting.VT100.Manual
Created: 2017-09-06 15:14:40 +0000

Escape Sequences from the Original VT100 User Guide-3rd Edition, June 1981, Copyright 1978, 1979, 1981 by Digital Equipment Corporation, Publication number EK-VT100-UG-003

SET-UP (p. 34)

The SET-UP key is at the upper-left corner of the main key array. Operations performed in SET-UP mode can be stored in nonvolatile memory (NVR) so that turning the terminal power off does not, by itself, alter the terminal configuration.

The procedures to change the SET-UP features are provided in the operator’s information section of this manual. Those SET-UP features which may be modified by the host are listed in Table 3-1 and described in detail under the escape sequences.

Table 3-1 Machine States (p. 35)

SET-UP Feature or Machine State Changeable from Host ComputerSaved in NVR and Changeable in SET-UP
Alternate keypad mode Yes (DECKPAM/DECKPNM) No
ANSI/VT52 Yes (DECANM) Yes
Auto Repeat Yes (DECARM) Yes
AUTO XON XOFF No Yes
Bits per character No Yes
Characters per line Yes (DECCOLM) Yes
Cursor No Yes
Cursor key mode Yes (DECCKM) No
Interlace Yes (DECINLM) Yes
New Line Yes (LNM) Yes
Keyclick No Yes
Margin bell No Yes
Origin mode Yes (DECOM) No
Parity No Yes
Parity sense No Yes
Power No Yes
Receive speed No Yes
Screen Yes DECSCNM)
Scroll Yes (DECSCLM) Yes
Tabs Yes (HTS/TBC) Yes
Transmit speed No Yes
Wraparound Yes (DECAWM) Yes
# Hash sign vs. £ British pound sign (shift-3)Yes (SCS) Yes

Keyboard Operation (p. 34)

The operator uses the keyboard to transmit codes to the host. Some keys transmit one or more codes to the host immediately when typed. Other keys such as CTRL and SHIFT do not transmit codes when typed, but modify the codes transmitted by other keys. The code-transmitting keys cause the terminal to make a clicking sound to verify to the operator that the keystroke has been processed by the terminal. If two code-transmitting keys are pressed together, two codes will be transmitted according to the order in which they were typed. The terminal will not wait for the keys to be lifted, but will transmit both codes as soon as possible after the keys are first typed. If three such keys are pressed simultaneously, the codes for the first two keys are transmitted immediately; the code for the third will be transmitted when one of the first two keys is lifted.

Alphabetic Keys (p. 35)

The VT100 will transmit the lowercase code unless either or both of the SHIFT keys are down, or unless the CAPS LOCK key is down. Pressing the CAPS LOCK key will lock only the 26 alphabetic keys in the shifted (uppercase) mode. Table 3-2 shows the codes generated by the alphabetic keys.

Table 3-2 Alphabetic Key Codes (p. 35)

KeyUppercase Code (Octal)Lowercase Code (Octal)
A 101 141
B 102 142
C 103 143
D 104 144
E 105 145
F 106 146
G 107 147
H 110 150
I 111 151
J 112 152
K 113 153
L 114 154
M 115 155
N 116 156
O 117 157
P 120 160
Q 121 161
R 122 162
S 123 163
T 124 164
U 125 165
V 126 166
W 127 167
X 130 170
Y 131 171
Z 132 172

Non-Alphabetic Keys (p. 36)

Each of the non-alphabetic keys can be used to generate two different codes. One code will be generated if neither SHIFT key is pressed. The other code will be generated if either or both of the SHIFT keys are down. Unlike the SHIFT LOCK key of a typewriter, the CAPS LOCK key does not affect these keys; it affects only the alphabetic keys. Table 3-3 shows the non-alphabetic keys and the codes they generate.

Table 3-3 Non-alphabetic Key Codes (p. 36)

Lowercase CharacterNeither SHIFT Key Down (Octal)Uppercase Character Either or Both SHIFT Keys Down (Octal)
1 061 ! 041
2 062 @ 100
3 063 # or £ (hash sign or British pound sign043
4 064 $ 044
5 065 % 045
6 066 136
7 067 & 046
8 070 * 052
9 071 ( 050
0 060 ) 051
- (dash) 055 _ (underscore) 137
= (equal sign) 075 + (plus sign) 053
[ 133 { 173
; (semicolon) 073 : (colon) 072
’ (apostrophe) 047 “ (double quote) 042
, (comma) 054 < 074
. (period) 056 > 076
/ (forward slash) 057 ? 077
\ (back slash) 134 (bar) 174
` (acute) 140 ~ (tilde) 176
] 135 } 175

Function Keys (p. 36)

There are several keys on the keyboard which transmit control codes. Control codes do not produce displayable characters but are codes for functions. If these codes are received by the terminal, the VT100 will perform the associated function as shown in Table 3-4.

Table 3-4 Function Key Codes (p. 36)

Key Octal Value of Code Sent or Received by VT100Action The Terminal Would Take if Host Sent That Code
RETURN* 015 Carriage return function
LINEFEED 012 Line Feed
BACKSPACE010 Backspace function
TAB 011 Tab function
SPACE BAR040 Deposit a space on the screen erasing what was there before.
ESC 033 The initial delimiter of an escape sequence - interpret the following character string from the host as a command, rather than displaying it.
DELETE 177 Ignored by the VT100

* The RETURN key can be defined so that it issues 015 (octal), 012 (octal), (carriage return - linefeed). The New Line feature in SET-UP mode provides this capability.

CTRL (Control) (p. 37)

The CTRL key is used in conjunction with other keys on the keyboard to generate control codes. If the CTRL keys held down when any of the keys in Table 3-5 are typed, the code actually transmitted is in the range 000 (octal) - 037 (octal).

Table 3-5 Control Codes Generated (p.37)

Key Pressed with CTRL key down (shifted or unshifted)Octal Code TransmittedFunction Mnemonic
Space Bar 000 NUL
A 001 SOH
B 002 STX
C 003 ETX
D 004 EOT (end of transmission)
E 005 ENQ (enquire)
F 006 ACK (acknowledge)
G 007 BELL (sounds the bell)
H 010 BS (backspace)
I 011 HT (horizontal tab)
J 012 LF (line feed)
K 013 VT (vertical tab)
L 014 FF (form feed)
M 015 CR (carriage return)
N 016 SO
O 017 SI
P 020 DLE
Q 021 DC1 or XON
R 022 DC2
S 023 DC3 or XOFF
T 024 DC4
U 025 NAK
V 026 SYN
W 027 ETB
X 030 CAN
Y 031 EM
Z 032 SUB
[ 033 ESC (escape)
\ 034 FS
] 035 GS
~ 036 RS
? 037 US

Cursor Control (p. 38)

The keyboard also contains four keys labeled with arrows in each of four directions. These keys transmit control sequences. If the host echoes these control sequences back to the terminal, the cursor will move one character up, down, right or left. Table 3-6 shows the control sequences generated by each key.

Table 3-6 Cursor Control Key Codes

Cursor Key (Arrow)VT52 ModeANSI Mode and Cursor Key Mode ResetANSI Mode and Cursor Key Mode Set
Up ESC A ESC [ A ESC O A
Down ESC B ESC [ B ESC O B
Right ESC C ESC [ C ESC O C
Left ESC D ESC [ D ESC O D

Auxiliary Keypad (p. 38)

The keys on the auxiliary keypad normally transmit the codes for the numerals, decimal point, minus sign, and comma. In addition, the key labeled ENTER transmits the same code as the RETURN key. The host cannot tell if these keys were typed on the auxiliary keypad as opposed to the corresponding keys on the main keyboard. Therefore, software which requires considerable numeric data entry need not be rewritten to use the keypad.

However, if software must be able to distinguish between pressing a key on the auxiliary keypad and pressing the corresponding key on the main keyboard, the host can give the terminal a command to place it in keypad application mode. In keypad application mode all keys on the auxiliary keypad are defined to give control sequences which may be used by the host as user-defined functions.

The codes sent by the auxiliary keypad for the four combinations of the VT/ANSI mode and keypad numeric/application mode are shown in Tables 3-7 and 3-8. None of the keys are affected by pressing the SHIFT, CAPS LOCK, or CTRL keys.

Table 3-8 ANSI Mode Auxiliary Keypad Codes

Key Keypad Numeric ModeKeypad Application Mode
0 0 ESC O p
1 1 ESC O q
2 2 ESC O r
3 3 ESC O s
4 4 ESC O t
5 5 ESC O u
6 6 ESC O v
7 7 ESC O w
8 8 ESC O x
9 9 ESC O y
- (dash) - (dash) ESC O m
, (comma) , (comma) ESC O l (lowercase L)
. (period). (period) ESC O n
ENTER Same as RETURN key ESC O M
PF1 ESC O P ESC O P
PF2 ESC O Q ESC O Q
PF3 ESC O R ESC O R
PF4 ESC O S ESC O S

Note: In ANSI mode, if the codes are echoed back to the VT100, or if the terminal is in local mode, the last character of the sequence will be displayed on the screen; e.g., PF1 will display a “P.”

Special Graphics Characters (p. 39)

If the Special Graphics set is selected, the graphics for ASCII codes 137 (octal) through 176 (octal) will be replaced according to Table 3-9. (See the SCS control sequence.)

Table 3-9 Special Graphics Characters (p. 39)

Octal CodeGraphic with US or UK SetGraphic with “Special Graphics” Set
137 - (dash) Blank
140 \ ◊ Diamond
141 a Checkerboard (error indicator)
142 b “HT” Horizontal Tab
143 c “FF” Form Feed
144 d “CR” Carriage Return
145 e “LF” Line Feed
146 f ° Degree
147 g ± Plus/Minus
150 h “NL” New Line
151 i “VT” Vertical Tab
152 j Line drawing, lower-right corner
153 k Line drawing, upper-right corner
154 l (lowercase L) Line drawing, upper-left corner
155 m Line drawing, lower-left corner
156 n Line drawing, crossing lines “+”
157 o Line drawing, horizontal line, scan 1
160 p Line drawing, horizontal line, scan 3
161 q Line drawing, horizontal line, scan 5
162 r Line drawing, horizontal line, scan 7
163 s Line drawing, horizontal line, scan 9
164 t Line drawing, left “T”
165 u Line drawing, right “T”
166 v Line drawing, bottom “T”
167 w Line drawing, top “T”
170 x Line drawing, vertical bar ”
171 y ≤ Less than or equal
172 z ≥ Greater than or equal to
173 { π Pi
174 ≠ Not equal to
175 } £ British pound
176 ~ Centered dot

Note 1: Codes 152 (octal) - 156 (octal), 161 (octal) and 164 (octal) - 170 (octal) are used to draw rectangualr grids; each piece of this line drawing set is contiguous with others so that the lines formed are unbroken. Note 2: Codes 157 (octal) - 163 (octal) give better vertical resolution than dashes and underlines when drawing graphs; using these segments 120 x 132 resolution may be obtained in 132 column mode with the Advanced Video Option installed.

eric/computer/bash/shell_scripting/shell.scripting.vt100.manual.1791495961.txt.gz · Last modified: by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki