This appendix provides a summary of VT102 escape and control sequences.
+
Figure C-1 shows the codes generated by the standard keys. Figure C-2
+shows the control codes generated by the function keys; shaded keys do
+not need CTRL down to generate the control character.
+
Programming Sequences
+
The rest of this appendix repeats the information on the VT102 Programming
+Reference Card (EK-VT102-RC-001).
+
Control Characters Received
+
+
+
+
Name
+
Character Mnemonic
+
Octal Code
+
Function
+
+
+
+
+
Null
+
NUL
+
000
+
Ignored when received (not stored in input buffer) and used as a fill character.
+
+
+
End of text
+
ETX
+
003
+
Can be selected as a half-duplex turnaround character.
+
+
+
End of transmission
+
EOT
+
004
+
Can be selected as a disconnect character or half-duplex turnaround character. When used as a turnaround
+character, the disconnect character is DLE-EOT.
+
+
+
Enquire
+
ENQ
+
005
+
Transmits answerback message.
+
+
+
Bell
+
BEL
+
007
+
Generates bell tone.
+
+
+
Backspace
+
BS
+
010
+
Moves cursor to the left one character position; if cursor is at left margin,
+no action occurs.
+
+
+
Horizontal tab
+
HT
+
011
+
Moves cursor to next tab stop, or to right margin if there are no more tab stops.
+
+
+
Linefeed
+
LF
+
012
+
Causes a linefeed or a new line operation. (See Linefeed/New Line mode). Also causes
+printing if auto print operation selected.
+
+
+
Vertical tab
+
VT
+
013
+
Processed as LF.
+
+
+
Form feed
+
FF
+
014
+
Processed as LF. FF can also be selected as a half-duplex turnaround character.
+
+
+
Carriage return
+
CR
+
015
+
Moves cursor to left margin on current line. CR can also be selected as a half-duplex
+turnaround character.
+
+
+
Shift out
+
SO
+
016
+
Selects G1 character set designated by a select character set sequence.
+
+
+
Shift in
+
SI
+
017
+
Selects G0 character set designated by a select character set sequence.
+
+
+
Device control 1
+
DC1
+
021
+
Processed as XON. DC1 causes terminal to continue transmitting characters.
+
+
+
Device control 3
+
DC3
+
023
+
Processed as XOFF. DC3 causes terminal to stop transmitting all characters except
+XOFF and XON. DC3 can also be selected as a half-duplex turnaround character.
+
+
+
Cancel
+
CAN
+
030
+
If received during an escape or control sequence, cancels the sequence and displays
+substitution character ().
+
+
+
Substitute
+
SUB
+
032
+
Processed as CAN.
+
+
+
Escape
+
ESC
+
033
+
Processed as a sequence introducer.
+
+
+
+
ANSI Compatible Sequences
+
Set Mode
+
+
+
+
Name
+
Mnemonic
+
Mode
+
Sequence
+
+
+
+
+
Keyboard action
+
KAM
+
Locked
+
ESC [ 2 h
+
+
+
Insertion-replacement
+
IRM
+
Insert
+
ESC [ 4 h
+
+
+
Send-receive
+
SRM
+
Off
+
ESC [ 1 2 h
+
+
+
Linefeed/new line
+
LMN
+
New line
+
ESC [ 2 0 h
+
+
+
Cursor key
+
DECCKM
+
Application
+
ESC [ ? 1 h
+
+
+
ANSI/VT52
+
DECANM
+
ANSI
+
N/A
+
+
+
Column
+
DECCOLM
+
132 column
+
ESC [ ? 3 h
+
+
+
Scrolling
+
DECSCLM
+
Smooth
+
ESC [ ? 4 h
+
+
+
Screen
+
DECSCNM
+
Reverse
+
ESC [ ? 5 h
+
+
+
Origin
+
DECOM
+
Relative
+
ESC [ ? 6 h
+
+
+
Auto wrap
+
DECAWM
+
On
+
ESC [ ? 7 h
+
+
+
Auto repeat
+
DECARM
+
On
+
ESC [ ? 8 h
+
+
+
Print form feed
+
DECPFF
+
On
+
ESC [ ? 1 8 h
+
+
+
Print extent
+
DECPEX
+
Full screen
+
ESC [ ? 1 9 h
+
+
+
+
Reset Mode
+
+
+
+
Name
+
Mnemonic
+
Mode
+
Sequence*
+
+
+
+
+
Keyboard action
+
KAM
+
Unlocked
+
ESC [ 2 l
+
+
+
Insertion-replacement
+
IRM
+
Replace
+
ESC [ 4 l
+
+
+
Send-receive
+
SRM
+
On
+
ESC [ 1 2 l
+
+
+
Linefeed/new line
+
LMN
+
Linefeed
+
ESC [ 2 0 l
+
+
+
Cursor key
+
DECCKM
+
Cursor
+
ESC [ ? 1 l
+
+
+
ANSI/VT52
+
DECANM
+
VT52
+
ESC [ ? 2 l
+
+
+
Column
+
DECCOLM
+
80 column
+
ESC [ ? 3 l
+
+
+
Scrolling
+
DECSCLM
+
Jump
+
ESC [ ? 4 l
+
+
+
Screen
+
DECSCNM
+
Normal
+
ESC [ ? 5 l
+
+
+
Origin
+
DECOM
+
Absolute
+
ESC [ ? 6 l
+
+
+
Auto wrap
+
DECAWM
+
Off
+
ESC [ ? 7 l
+
+
+
Auto repeat
+
DECARM
+
Off
+
ESC [ ? 8 l
+
+
+
Print form feed
+
DECPFF
+
Off
+
ESC [ ? 1 8 l
+
+
+
Print extent
+
DECPEX
+
Scrolling region
+
ESC [ ? 1 9 l
+
+
+
+
+
* The last character of the sequence is lowercase L (1548)
+
+
+
+
Cursor Key Codes Generated
+
+
+
+
Cursor Key (Arrow)
+
ANSI Characters Generated
+
+
+
Reset (Cursor)
+
Set (Application)
+
+
+
+
+
Up
+
ESC [ A
+
ESC O A
+
+
+
Down
+
ESC [ B
+
ESC O B
+
+
+
Right
+
ESC [ C
+
ESC O C
+
+
+
Left
+
ESC [ D
+
ESC O D
+
+
+
+
Keypad Character Selection
+
+
+
+
Name
+
Mnemonic
+
Sequence
+
+
+
+
+
Alternate
+
DECKPAM
+
ESC =
+
+
+
Numeric
+
DECKPNM
+
ESC >
+
+
+
+
Keypad Codes Generated
+
+
+
+
Key
+
VT52 Numeric Keypad Mode
+
VT52 Alternate Keypad Mode
+
ANSI Numeric Keypad Mode
+
ANSI Alternate Keypad Mode
+
+
+
+
+
0
+
0
+
ESC ? p
+
0
+
ESC O p
+
+
+
+
+
+
+
+
+
+
1
+
1
+
ESC ? q
+
1
+
ESC O q
+
+
+
2
+
2
+
ESC ? r
+
2
+
ESC O r
+
+
+
3
+
3
+
ESC ? s
+
3
+
ESC O s
+
+
+
4
+
4
+
ESC ? t
+
4
+
ESC O t
+
+
+
5
+
5
+
ESC ? u
+
5
+
ESC O u
+
+
+
6
+
6
+
ESC ? v
+
6
+
ESC O v
+
+
+
7
+
7
+
ESC ? w
+
7
+
ESC O w
+
+
+
8
+
8
+
ESC ? x
+
8
+
ESC O x
+
+
+
9
+
9
+
ESC ? y
+
9
+
ESC O y
+
+
+
- (minus)
+
- (minus)
+
ESC ? m
+
- (minus)
+
ESC O m
+
+
+
, (comma)
+
, (comma)
+
ESC ? l*
+
, (comma)
+
ESC O l*
+
+
+
. (period)
+
. (period)
+
ESC ? n
+
. (period)
+
ESC O n
+
+
+
ENTER
+
Same as RETURN
+
ESC ? M
+
Same as RETURN
+
ESC O M
+
+
+
PF1
+
ESC P
+
ESC P
+
ESC O P
+
ESC O P
+
+
+
PF2
+
ESC Q
+
ESC Q
+
ESC O Q
+
ESC O Q
+
+
+
PF3
+
ESC R
+
ESC R
+
ESC O R
+
ESC O R
+
+
+
PF4
+
ESC S
+
ESC S
+
ESC O S
+
ESC O S
+
+
+
+
+
* The last character of the sequence is lowercase L (1548)
Invoke confidence test (data loopback test; requires test connector)
+
DECTST
+
ESC [ 2 ; 2 y
+
+
+
Invoke confidence test (EIA modem control test; requires test connector)
+
DECTST
+
ESC [ 2 ; 4 y
+
+
+
Invoke confidence test (repeat power-up test continuously until failure or power-off)
+
DECTST
+
ESC [ 2 ; 9 y
+
+
+
Invoke confidence test (repeat data loopback test continuously until failure or power-off; requires test connector)
+
DECTST
+
ESC [ 2 ; 1 0 y
+
+
+
Invoke confidence test (repeat EIA test continuously until failure or power-off; requires test connector)
+
DECTST
+
ESC [ 2 ; 1 2 y
+
+
+
Invoke confidence test (printer port data loopback test; requires test connector)
+
DECTST
+
ESC [ 2 ; 1 6 y
+
+
+
Invoke confidence test (repeat printer port data loopback test continuously until failure or power-off; requires test connector)
+
DECTST
+
ESC [ 2 ; 2 4 y
+
+
+
+
Keyboard LEDs
+
+
+
+
Name
+
Mnemonic
+
Sequence
+
+
+
+
+
Load LEDs (L1 off)
+
DECLL
+
ESC [ q
+
+
+
Load LEDs (L1 off)
+
DECLL
+
ESC [ 0 q
+
+
+
Load LEDs (L1 on)
+
DECLL
+
ESC [ 1 q
+
+
+
+
VT52 Compatible Mode
+
+
+
+
Modes
+
Sequence
+
+
+
+
+
Enter ANSI mode
+
ESC <
+
+
+
+
Keypad Character Selection
+
+
+
+
Name
+
Sequence
+
+
+
+
+
Enter alternate keypad mode
+
ESC =
+
+
+
Exit alternate keypad mode (Numeric keypad mode)
+
ESC >
+
+
+
+
NOTE: VT52 alternate keypad and numeric keypad mode different than ANSI.
+
Character Sets
+
+
+
+
Name
+
Sequence
+
+
+
+
+
Special graphics character set
+
ESC F*
+
+
+
Select US/UK character set (as determined by the US/UK character SET-UP feature)
+
ESC G
+
+
+
* Same as special character and line drawing set in ANSI mode.
+
+
+
+
Cursor Position
+
+
+
+
Name
+
Sequence
+
+
+
+
+
Cursor up*
+
ESC A
+
+
+
Cursor down*
+
ESC B
+
+
+
Cursor right*
+
ESC C
+
+
+
Cursor left*
+
ESC D
+
+
+
Cursor to home
+
ESC H
+
+
+
Direct cursor address
+
ESC Y Pl Pc†
+
+
+
Reverse line feed
+
ESC I‡
+
+
+
* Same when sent from the terminal.
+
+
+
† Line and column numbers for direct cursor address are single character codes whose values are the desired number plus 378.
+Line and colum numbers start at one.
+
+
+
‡ The last character of the sequence is an uppercase i (1118).