ANSI Programming. AccuSoft 7
Advertisement
Advertisement
240 AccuTerm 7 Help
3.3.2
ADDS Programming Notes
Functions tagged with the diamond symbol are only valid in Viewpoint 60 or Procomm VP60 emulation.
3.4
ANSI Programming
The AccuTerm ANSI emulations provide VT52, VT100, VT220, VT320, VT420, SCO Console, Linux
Console and ANSI BBS emulations. The VT220, VT320 and VT420 emulations support international characters, 7 and 8 bit control codes, programmable function keys and a robust command set. VT100 supports 7 bit control codes and a subset of the VT220 command set.
The SCO Console emulation uses the PC (OEM) character set and supports programmable function keys and text and background colors.
The Linux Console emulation uses the ANSI character set, and includes support for programmable function keys, text and background colors, and mouse.
The ANSI BBS emulation supports the PC (OEM) character set and the attribute and cursor commands supported by the DOS ANSI.SYS device driver (AccuTerm does not use the ANSI.SYS driver). The
ANSI BBS emulation only supports 7 bit escape sequences.
When AccuTerm is emulating a VT220, VT320 or VT420 terminal snipor SCO or Linux Console, it will respond to 7-bit and 8-bit control codes (hex 00-1F and 80-9F). For convenience, command sequences which may use 8-bit control codes are documented using the 8-bit control code. For every 8-bit control code, an equivalent 7-bit escape sequence may also be used, as shown in the following table:
CSI
SS3
DCS
=
ESC
[
=
ESC
O
=
ESC
P
Copyright 2010-2013 Schellenbach & Assoc., Inc.
AccuTerm 7 Reference 241
ST
=
ESC
\
This chapter documents commands used by all of the ANSI emulations supported by AccuTerm. Not every command is valid for all ANSI emulations. Those commands which are only valid for certain emulations are shown with a reference note after the command definition. These reference are indicated by a superscript, and are VT100 1 , VT220 2 , VT320 3 , VT420 4 , ANSI BBS A , Linux Console L , and
SCO Console S .
The AccuTerm ANSI emulations operate in a variety of modes. Some of the default operating modes are determined by settings in the AccuTerm configuration. Most of these modes can be changed by commands received from the host. Operating modes which can be selected in the Settings dialog and saved in a configuration file are:
VT52, VT100, VT220, VT320, VT420, SCO Console, Linux Console or ANSI BBS emulation
80 (normal) or 132 (extended) columns
Automatic wrap at end of line
Send 7 or 8 bit control codes
Numeric keypad sends “application” codes instead of numbers
Cursor keys send “application” codes instead of cursor codes
Backspace key sends
DEL
control code instead of
BS
control code
The following operating modes are not determined by settings in the AccuTerm configuration, but may be changed by sending the appropriate ANSI command sequence:
Keyboard: default is unlocked.
Insert/Replace: default is replace.
Line feed / New line: default is line feed.
Origin: default is absolute.
Tabs: default is every 8 columns.
Cursor: default is on.
Print extent: default is full screen.
Printer form-feed: default is off.
Graphics mode: default is off.
AccuTerm VT220, VT320 and VT420 emulations support 5 character sets: ASCII, Multinational, ISO-
Latin1, Graphics and Scientific. The default character set assignment is G0=ASCII, G1=ASCII,
G2=Multinational and G3=ASCII. The GL set (hex 20-7E) defaults to G0 (ASCII) and the GR set (hex
Copyright 2010-2013 Schellenbach & Assoc., Inc.
242 AccuTerm 7 Help
A0-FE) defaults to G2 (Multinational).
Operating Modes
ESC
c
Hard reset. Re-reads AccuTerm configuration file, then resets all operating modes and character sets to their default values. Clears the screen and I/O buffer.
CSI
! p
Soft reset. Resets all operating modes and character sets to their default values.234
CSI
n + p
Secure reset. Re-reads AccuTerm configuration file, then resets all operating modes and character sets to their default values. Clears the screen and I/O buffer. If
n
is non-zero, then
AccuTerm responds by sending
CSI
n * q
back to the host. The value of
n
must be between 0 and 16383. 1234
ESC SPACE
F
Causes AccuTerm to send 7-bit control codes: 234
CSI
SS3
DCS
ST
=
ESC
[
=
ESC
O
=
ESC
P
=
ESC
\
ESC SPACE
G
Causes AccuTerm to send 8-bit control codes
CSI
,
SS3
,
DCS
and
ST
. 234
CSI
6 1 " p
Changes the emulation to VT100.234
CSI
6 2 ;
n " p
Changes the emulation to VT220. If
n
= 1, AccuTerm will equivalent send 7-bit escape sequences for control codes
CSI
,
SS3
,
DCS
and
ST
; otherwise, 8-bit control codes will be sent.234
CSI
6 3 ;
n " p
Changes the emulation to VT320. If
n
= 1, AccuTerm will equivalent send 7-bit escape sequences for control codes
CSI
,
SS3
,
DCS
and
ST
; otherwise, 8-bit control codes will be sent.234
CSI
6 4 ;
n " p
Changes the emulation to VT420. If
n
= 1, AccuTerm will equivalent send 7-bit escape sequences for control codes
CSI
,
SS3
,
DCS
and
ST
; otherwise, 8-bit control codes will be sent.234
CSI
2 h
Locks the keyboard.
Copyright 2010-2013 Schellenbach & Assoc., Inc.
AccuTerm 7 Reference 243
CSI
2 l
Unlocks the keyboard.
CSI
3 h
Enable display of control characters as symbols.
CSI
3 l
Disable display of control characters (execute control characters.
CSI
4 h
Insert mode on.
CSI
4 l
Insert mode off.
CSI
12 h
Full duplex (no local echo).
CSI
12 l
Half duplex (local echo).
CSI
20 h
Process
LF
,
VT
and
FF
as "new line"; that is perform carriage return and line feed.
CSI
20 l
Process
LF
,
VT
and
FF
as line feed.
CSI
42 h
Changes emulation to Wyse 60.
CSI
? 1 h
Cursor keys return application codes.
CSI
? 1 l
Cursor keys return cursor codes.
CSI
? 2 l
Enter VT52 emulation mode.
CSI
? 3 h
Extended video mode (132 columns).
CSI
? 3 l
Normal video mode (80 columns).
CSI
? 5 h
Light background, dark text.
CSI
? 5 l
Dark background, light text.
CSI
? 6 h
Copyright 2010-2013 Schellenbach & Assoc., Inc.
244 AccuTerm 7 Help
Causes cursor positioning to be relative to the currently defined scrolling region.
CSI
? 6 l
Causes cursor positioning to be absolute (not relative).
CSI
? 7 h
Sets autowrap mode. When the cursor is on the last character of a line, receipt of another character causes the cursor to move to the first column of the next line.
CSI
? 7 l
Resets autowrap mode. The cursor will not move past the last column of the line upon receipt of another character.
CSI
? 9 h
or
CSI
0 $ ~
Status line off. 234
CSI
? 9 l
Status line on.234
CSI
1 $ ~
Display local status line. 234
CSI
2 $ ~
Display host-writable status line. 234
CSI
0 $ }
Data sent to screen's data area. 234
CSI
1 $ }
Data sent to host-writable status line. 234
CSI
? 18 h
Causes a form-feed character (hex 0C) to be sent to the printer after each print screen.
CSI
? 18 l
No character is sent to the printer after each print screen.
CSI
? 19 h
Print screen command causes the full screen to be printed.
CSI
? 19 l
Print screen command only prints the currently defined scrolling region.
CSI
? 25 h
Cursor on.
CSI
? 25 l
Cursor off.
CSI
? 38 h
or
GS
or
ESC
1
Enters Tektronix 4014 graphics mode.
Copyright 2010-2013 Schellenbach & Assoc., Inc.
CSI
? 38 l
or
CAN
or
ESC
2
Exits Tektronix 4014 graphics mode.
CSI
? 66 h
Cursor keys return application codes. 234
CSI
? 66 l
Cursor keys return cursor codes. 234
CSI
? 67 h
Backspace keys sends
BS
control code. 34
CSI
? 67 l
Backspace keys sends
DEL
control code. 34
CSI
? 69 h
Enables vertical split screen mode. 4
CSI
? 69 l
Disables vertical split screen mode. 4
CSI
? 95 h
Do not clear screen when column mode changes. 34
CSI
? 95 l
Clear screen when column mode changes. 34
CSI
? 109 h
Set
CapsLock
keyboard state.
CSI
? 109 l
Clear
CapsLock
keyboard state.
ESC
% ! 0
Enters Tektronix 4100 graphics mode.
CSI
0
SP
q
or
CSI
1
SP
q
or
CSI
2
SP
q
Select block cursor. 234
CSI
3
SP
q
or
CSI
4
SP
q
Select underscore cursor. 234
CSI
n $ |
Set number of columns to
n
. 34
CSI
n t
or
CSI
n * |
Set number of rows to
n
. 34
Copyright 2010-2013 Schellenbach & Assoc., Inc.
AccuTerm 7 Reference 245
246 AccuTerm 7 Help
CSI
n , q
Sets the terminal ID returned in response to the DA1 command. Valid values for
n
are: 0 =
VT100, 1 = VT101, 2 = VT102, 5 = VT220 and 6 = VT320. 34
CSI
n * x
Selects if visual attributes which are modified by the DECCARA or DECRARA commands are contained within the rectangular area defined by the beginning and ending positions. If
n
= 0 or 1 then beginning and ending positions indicate locations in the character stream displayed on the screen; if
n
= 2, then the beginning and ending positions indicate the upper-left and lower-right corners of a rectangle. L
CSI
? 9 h
Enable mouse reporting. L
CSI
? 9 l
Disable mouse reporting. L
CSI
n = L
Set erase mode. If
n
= 0, new lines and clear screen are filled with the current background color. Otherwise, new lines and clear screen fill with the screen background color. S
ESC
=
Numeric pad returns application codes.
ESC
>Numeric pad returns numbers.
Character Set Selection
ESC
( B
Sets character set G0 to ASCII (default). 1234L
ESC
) B
Sets character set G1 to ASCII (default). 1234L
ESC
* B
Sets character set G2 to ASCII. 234L
ESC
+ B
Sets character set G3 to ASCII. 234L
ESC
( <
Sets character set G0 to UPSS (the character set selected in the terminal settings). 234L
ESC
) <
Sets character set G1 to UPSS (the character set selected in the terminal settings). 234L
ESC
* <
Copyright 2010-2013 Schellenbach & Assoc., Inc.
AccuTerm 7 Reference 247
Sets character set G2 to UPSS (the character set selected in the terminal settings - this is the default). 234
ESC
+ <
Sets character set G3 to UPSS (the character set selected in the terminal settings). 234
ESC
( A
Sets character set G0 to ISO-Latin1. 1L
ESC
) A
Sets character set G1 to ISO-Latin1. 1L
ESC
- A
Sets character set G1 to ISO-Latin1. 234
ESC
. A
Sets character set G2 to ISO-Latin1.234
ESC
/ A
Sets character set G3 to ISO-Latin1.234
ESC
( 0
Sets character set G0 to graphics. 1234L
ESC
) 0
Sets character set G1 to graphics. 1234L
ESC
* 0
Sets character set G2 to graphics. 234
ESC
+ 0
Sets character set G3 to graphics. 234
ESC
( S
Sets character set G0 to scientific.234
ESC
) S
Sets character set G1 to scientific. 234
ESC
* S
Sets character set G2 to scientific. 234
ESC
+ S
Sets character set G3 to scientific. 234
ESC
( % 5
Sets character set G0 to Multinational. 1234
Copyright 2010-2013 Schellenbach & Assoc., Inc.
248 AccuTerm 7 Help
ESC
) % 5
Sets character set G1 to Multinational. 1234
ESC
* % 5
Sets character set G2 to Multinational. 234
ESC
+ % 5
Sets character set G3 to Multinational. 234
ESC
( K
or
ESC
( U
Sets character set G0 to codepage 437. L
ESC
) K
or
ESC
) U
Sets character set G1 to codepage 437. L
ESC
(
VT
Sets character set G0 to codepage 437. LS
ESC
)
VT
Sets character set G1 to codepage 437. LS
ESC
(
FF
Sets character set G0 to upper half of codepage 437. LS
ESC
)
FF
Sets character set G1 to upper half of codepage 437. LS
SI
Invoke character set G0 into GL (the GL set corresponds to character codes in the range of hex 20-7E); this is the default. 1234LS
SO
Invoke character set G1 into GL. 1234LS
ESC
~
Invokes character set G1 into GR (the GR set corresponds to character codes in the range of hex A0-FE). 234
ESC
n
Invokes character set G2 into GL. 234
ESC
}
Invokes character set G2 into GR (default). 234
ESC
o
Invokes character set G3 into GL. 234
Copyright 2010-2013 Schellenbach & Assoc., Inc.
AccuTerm 7 Reference 249
ESC
|
Invokes character set G3 into GR. 234
SS2
or
ESC
N
Invokes character set G2 into GL for the next character only. 234
SS3
or
ESC
O
Invokes character set G3 into GL for the next character only. 234
Cursor Positioning
BS
Moves the cursor back one space. If the cursor is at the beginning of the line, no action occurs.
HT
Moves the cursor to the next programmed tab stop. If there are no more tab stops, the cursor moves to the right margin.
LF
Moves the cursor down one line. If the cursor is on the last line of the scrolling region, the screen will scroll up one line.
VT
Same as
LF
.
FF
Same as
LF
.
CR
Moves the cursor to the left margin of the current line.
NEL
or
ESC
E
Moves the cursor to the first column of the next line of the scrolling region. If the cursor is on the last line of the scrolling region, the screen will scroll up one line.
IND
or
ESC
D
Moves cursor down one line in the same column. If the cursor is on the last line of the scrolling region, the screen will scroll up one line.
CSI
n T
Moves cursor down
n
lines in the same column. If the cursor is moved to the last line of the scrolling region, the screen will scroll up. S
RI
or
ESC
M
Moves the cursor up one line in the same column. If the cursor is on the first line of the scrolling region, the screen will scroll down one line.
CSI
n S
Copyright 2010-2013 Schellenbach & Assoc., Inc.
250 AccuTerm 7 Help
CSI
n B
or
CSI
n e
Moves cursor down
n
lines in the same column.
CSI
n E
Moves cursor down
n
lines and to the first column. 1234LS
CSI
n A
Moves the cursor up
n
lines in the same column. If the cursor is moved to the first line of the scrolling region, the screen will scroll down. S
Moves the cursor up
n
lines in the same column.
CSI
n F
Moves the cursor up
n
lines and to the first column. 1234LS
CSI
n D
Moves cursor left
n
columns.
CSI
n C
or
CSI
n a
Moves cursor right
n
columns.
CSI
line ; column H
or
CSI
line ; column f
Move cursor to line
line
, column
column
.
CSI
n d
Moves cursor to line
n
. 1234LS
CSI
n G
or
CSI
n `
Moves cursor to column
n
. 1234LS
HTS
or
ESC
H
or
CSI
0 W
Sets a tab stop at the column where the cursor is.
CSI
0 g
or
CSI
2 W
Clears a tab stop at the column where the cursor is. 1234LS
CSI
3 g
or
CSI
5 W
Clears all tab stops. 1234LS
CSI
? 5 W
Sets tab stops every 8th column. 234
CSI
n I
Move forward
n
tab stops. 234
CSI
n Z
Move backward
n
tab stops. 234
CSI
n V
or
CSI
n
SPACE
R
Copyright 2010-2013 Schellenbach & Assoc., Inc.
AccuTerm 7 Reference 251
Display a preceding page. If
n
is 0 or 1, the previous page is displayed, otherwise
n
specifies the number of pages back to be displayed. 234
CSI
n U
or
CSI n SPACE
Q
Displays a following page. If
n
is 0 or 1, the next page is displayed, otherwise
n
specifies the number of pages forward to be displayed. 234
CSI n SPACE
P
Display page
n
. 234
CSI
top ; bottom r
Set scrolling region. The first line of the scrolling region is set to
top
; the last line to
bottom
.
Default values for
top
and
bottom
are 1 and 24 respectively. Once the scrolling region is defined, if origin mode is set to relative, the cursor may be positioned into, but not out of, the scrolling region. 1234LS
ESC
7
or
CSI
s
ALS
Save state (cursor position, video attribute, character set, autowrap, origin mode and protect mode).
ESC
8
or
CSI
u
ALS
Restore state.
CSI
left ; right s
Sets the left and right margins to define a horizontal scrolling region. This command only works when vertical split screen mode is enabled.
ESC
6
Move cursor left one column. If the cursor is at the left margin, all data within the margin scrolls right one column. The column that shifted past the right margin is lost. 4
ESC
9
Move cursor right one column. If the cursor is at the right margin, all data within the margin scrolls left one column. The column that shifted past the left margin is lost.4
ESC
8
Fill screen with upper-case “E”.
Erasing and Editing
CSI
0 J
Erases from the cursor to the end of the screen, including the cursor position.
CSI
1 J
Erases from the beginning of the screen to the cursor, including the cursor position.
CSI
2 J
Erases the entire screen (the cursor position is not moved).
Copyright 2010-2013 Schellenbach & Assoc., Inc.
252 AccuTerm 7 Help
CSI
0 K
Erases from the cursor to the end of the line, including the cursor position.
CSI
1 K
Erases from the beginning of the line to the cursor, including the cursor position.
CSI
2 K
Erases the entire line (the cursor is not moved).
CSI
? 0 J
Erases all unprotected characters from the cursor to the end of the screen, including the cursor position.
CSI
? 1 J
Erases all unprotected characters from the beginning of the screen to the cursor, including the cursor position.
CSI
? 2 J
Erases all unprotected characters on the entire screen (the cursor position is not moved).
CSI
? 0 K
Erases all unprotected characters from the cursor to the end of the line, including the cursor position.
CSI
? 1 K
Erases all unprotected characters from the beginning of the line to the cursor, including the cursor position.
CSI
? 2 K
Erases all unprotected characters on the line (the cursor is not moved).
CSI
n X
Erases
n
characters, beginning with the current cursor position. 234LS
CSI
n @
Insert
n
blank characters beginning at the current cursor position. 234LS
CSI
n L
Insert
n
blank lines beginning at the cursor line. 1234LS
CSI
n P
Delete
n
characters beginning at the current cursor position. 1234LS
CSI
n M
Delete
n
lines beginning at the cursor line. 1234LS
CSI
n ' }
Insert
n
columns into the scrolling region beginning at the column that has the cursor. 4
CSI
n ' ~
Copyright 2010-2013 Schellenbach & Assoc., Inc.
AccuTerm 7 Reference 253
Delete
n
columns from the scrolling region beginning at the column that has the cursor. 4
CSI
top ; left ; bottom ; right ; attr1 ; … ; attrn $ r
Changes visual attributes in an area defined by
top
,
left
,
bottom
,
right
. The area to be changed is either a character stream or rectangle as defined by the DECSACE command.
See
for the attribute codes. 4
CSI
top ; left ; bottom ; right ; attr1 ; … ; attrn $ t
Reverse visual attributes in an area defined by
top
,
left
,
bottom
,
right
. The area to be changed is either a character stream or rectangle as defined by the DECSACE command.
See
for the attribute codes. 4
CSI
top ; left ; bottom ; right $ z
Erase characters in rectangle defined by
top
,
left
,
bottom
,
right
. 4
CSI
top ; left ; bottom ; right $ {
Erase unprotected characters in rectangle defined by
top
,
left
,
bottom
,
right
. 4
CSI
ch ; top ; left ; bottom ; right $ x
Fill rectangle defined by
top
,
left
,
bottom
,
right
with character
ch
(ASCII code). 4
CSI
stop ; sleft ; sbottom ; sright ; spg ; dtop ; dleft ; dpg $ v
Copy rectangle defined by
stop
,
sleft
,
sbottom
,
sright
, from page
spg
to page
dpg
at location
dtop
,
dleft
. 4
Video Attributes
CSI
n ;
n
...
m
Selects video attributes and/or character foreground and background colors according to the
. Characters received after this command are displayed in the selected video attribute. If multiple parameters are used, their effects are cumulative (e.
g. 0;4;5 selects blinking-underlined). A parameter value of 0 resets all attributes.
CSI
0 " q
Unprotected mode. Characters received after this command are erasable using the “erase unprotected characters” command. 234
CSI
1 " q
Protected mode. Characters received after this command are not erasable using the “erase unprotected characters” command. 234
ESC
# 3
Double-high line top. Causes the line containing the cursor to display the top half of a double-high line. 1234
ESC
# 4
Double-high line bottom. Causes the line containing the cursor to display the bottom half of
Copyright 2010-2013 Schellenbach & Assoc., Inc.
254 AccuTerm 7 Help
a double-high line. 1234
ESC
# 5
Single-width line. Causes the line containing the cursor to display normal width characters.
1234
ESC
# 6
CSI
=
n F
Sets the current normal foreground color to
n
. Refer to “AccuTerm Programming” chapter for color values. S
CSI
=
n G
Sets the current normal background color to
n
. S
CSI
=
n H
Double-width line. Causes the line containing the cursor to display double width characters.
1234
Sets the current reverse foreground color to
n
. S
CSI
=
n I
Sets the current reverse background color to
n
. S
ESC
] P
nrrggbb
Set Linux Console palette.
N
is a single hex digit indicating which palette entry to set;
rrggbb
are the hex RGB color values to be set. L
ESC
] R
Reset Linux Console palette. L
Printer Control
CSI
0 i
Prints the screen display. Either the full screen or scrolling region may be selected, and a form feed may be sent after printing (see Operating Modes section.
CSI
10 i
Prints the screen display ignoring the print extent in effect. 34
CSI
? 1 i
Prints the current cursor line.
CSI
5 i
Transparent print mode. Characters are printed, but not displayed.
CSI
? 5 i
Auto print mode. When the “Auto-print works just like a VT terminal” setting is enabled, a line is printed from the screen when the cursor moves off that line with an
LF
,
FF
, or
VT
control code, or an autowrap occurs. Otherwise auto-print mode works just like Wyse auto-
Copyright 2010-2013 Schellenbach & Assoc., Inc.
AccuTerm 7 Reference 255
print mode.
CSI
4 i
or
CSI
? 4 i
Cancel transparent or auto print mode.
CSI
2 i
Send screen to host. 234
Terminal Reports
CSI
0 c
or
ESC
Z
Request primary device attributes. Depending on the current emulation and terminal ID in effect, AccuTerm will respond: 1234L
VT100:
CSI
? 1 ; 2 c
VT220:
VT320:
CSI
? 6 2 ; 1 ; 2 ; 6 ; 8 c
CSI
? 6 3 ; 1 ; 2 ; 6 ; 8 c
VT420:
Linux:
CSI
? 6 4 ; 1 ; 2 ; 6 ; 8 c
CSI
? 6 c
CSI
> 0 c
CSI
= 0 c
Request tertiary device attributes. AccuTerm will respond (
xxxxxxxx
is the product serial number in hexadecimal): 234
DCS
! |1
xxxxxxxx
ST
CSI
5 n
Request secondary device attributes. AccuTerm will respond: 234
CSI
> 41 ; 4 ; 1 c
Request terminal status. AccuTerm will respond:
CSI
0 n
CSI
6 n
Request cursor position. AccuTerm will respond:
CSI
line ; column R
CSI
? 6 n
Request cursor position and page. AccuTerm will respond:
CSI
line ; column ; page R
CSI
? 1 5 n
Request printer status. If a printer is defined for the current configuration, AccuTerm will respond: 234
CSI
? 1 0 n
If no printer is defined the response will be:
CSI
? 1 3 n
CSI
? 2 5 n
Request status of user-defined keys. AccuTerm will respond: 234
Copyright 2010-2013 Schellenbach & Assoc., Inc.
256 AccuTerm 7 Help
CSI
? 2 0 n
CSI
? 2 6 n
Request keyboard status. AccuTerm will respond: 234
CSI
? 2 7 ; 0 ; 0 ; 0 n
CSI
? 5 5 n
Request locator status. If the mouse is currently enabled, AccuTerm will respond:234
CSI
? 5 0 n
If the mouse is not enabled, the response will be:
CSI
? 5 3 n
CSI
? 5 6 n
Request locator device type. If the mouse is currently enabled, AccuTerm will respond: 234
CSI
? 5 7 ; 1 n
If the mouse is not enabled, the response will be:
CSI
? 5 7 ; 0 n
CSI
? 6 2 n
Request macro space. AccuTerm will respond: 234
CSI
0 * {
CSI
? 6 3 ;
id n
Request memory checksum. AccuTerm will respond: 234
DCS
id ! ~ 0 0 0 0
ST
CSI
? 7 5 n
Request data integrity. AccuTerm will respond: 234
CSI
? 7 0 n
CSI
" v
Request displayed extent. AccuTerm will respond: 34
CSI
rows ; columns ; 1 ; 1 ; page " w
CSI
n $ p
Request state of ANSI mode
n
. AccuTerm will respond: 34
CSI
n ; value $ y
CSI
?
n $ p
Request state of private mode
n
. AccuTerm will respond: 34
CSI
?
n ; value $ y
CSI
+ x
Request function key free memory. AccuTerm will respond: 34
CSI
804 ; 804 + y
CSI
1 $ w
Request cursor information report. AccuTerm will respond with a string encoded with the current cursor state including position, page, attribute and character set. The string returned
Copyright 2010-2013 Schellenbach & Assoc., Inc.
AccuTerm 7 Reference 257
can be use to restore the cursor state. The response string is:34
DCS
1 $ u
string
ST
DCS
1 $ t
string
ST
Restore cursor state. Use
string
returned from previous command. 34
CSI
2 $ w
Request tabstop report. AccuTerm will respond with a string encoded with the current tab settings. The string returned can be use to restore the tabs. The response string is: 34
DCS
2 $ u
string
ST
DCS
2 $ t
string
ST
Restore tabstops. Use
string
returned from previous command. 34
DCS
$ q
setting
ST
Request setting.
Setting
is formed by taking the last one or two non-numeric characters of an ANSI command. The response is: 34
DCS
0 $ r
string
ST
You can use the response
string
to restore the setting; Simply add
CSI
to the beginning of the string and send it back to the terminal.
CSI
1 $ u
Request terminal state. The complete terminal state (cursor position, character set, attributes, screen size, key lock, etc.) is encoded into a string and returned to the host.
You can use this string to restore the state later. The response is: 34
DCS
1 $ s
string
ST
DCS
1 $ p
string
ST
Restore terminal state.
String
is the value returned from the previous command. 34
Programming Function Keys
The AccuTerm VT220, VT320, VT420, Linux Console and SCO Console emulations support the ability to download up to 15 function key values (the shifted function keys
F6
-
F20
) from the host computer. The following device control sequence is used to program the function keys.
DCS
n | key / value ;
...
key
/
value
ST
If
n
is 1, old key definitions are replaced by new definitions; if
n
is 0, the definition of all 15 shifted function keys are cleared before loading any new definitions. The function key to be programmed is specified by
key
according to the
ANSI Function Key Table , and the
sequence for that key is specified by
value
.
Value
is specified in hexadecimal.
VT320 and VT420 emulations provide an extended method to program function and editing keys:
DCS
" x key / mod / 100 / value / 0 ;
...
ST
The key to be programmed is specified by
key
according to the
and any modifier keys (
SHIFT
,
CTRL
, etc.) are specificed by
mod
, according to the same table. The sequence for the key is specified by
value
in hexadecimal.
Copyright 2010-2013 Schellenbach & Assoc., Inc.
258 AccuTerm 7 Help
In addition, the VT420 emulation has user-definable macros. Use the following command to define macros.
DCS
id ; dt ; fn ; en ! z value
ST
Id is a macro identifier, which must be in the range of 0 to 63. If dt is 1, then all current macros are deleted before the new macro is defined. en specifies the encoding: 0 for ASCII text, 1 for hexadecimal. Value is the macro contents in the specified encoding format.
Invoking a macro has the same effect as if the terminal had received the macro contents from the host.
The following command may be use to invoke a defined macro:
CSI
id * z
4
The SCO Console emulation uses the following sequence to program function keys:
ESC
Q
key delim value delim
key is a single ASCII character which designates which key to program. Function keys
F1
to
F12
are selected by specifying
0
to
;
. For
SHIFT+F1
to
SHIFT+F12
use
<
to
G
. For
CTRL+F1
to
CTRL+F12
use
H
to
S
. For
CTRL+SHIFT+F1
to
CTRL+SHIFT+F12
use
T
to
_
. Delim is a single character delimiter which encloses value.
CSI
2 + z
Restores default values to programmed keys. 34
To program the Answerback message, use the following device control sequence:
DCS
1 v
value
ST
Note: the “Map F11 through F20 …” check box in the k eyboard settings must be check ed to access programmed function k eys from
F13
to
F20
. When this item is check ed, function k eys
F11 - F20
are mapped onto the control function k eys; e.g.
F15
is mapped to
CTRL+F5
,
SHIFT+F13
is mapped to
CTRL+SHIFT+F3
.
VT-52 Escape Sequences
ESC
A
Cursor up.
ESC
B
Cursor down.
ESC
C
Cursor right.
ESC
D
Cursor left.
ESC
F
Enter line graphics mode.
Copyright 2010-2013 Schellenbach & Assoc., Inc.
ESC
G
Exit line graphics mode.
ESC
H
Cursor home.
ESC
I
Reverse line feed.
ESC
J
Erase from cursor to end of screen.
ESC
K
Erase from cursor to end of line.
ESC
V
Print cursor line.
ESC
]
Print screen.
ESC
W
Transparent print mode.
ESC
X
Cancel transparent print mode.
ESC
^
Auto print mode.
ESC
_
Cancel auto print mode.
ESC
=
Keypad application mode on.
ESC
>
Keypad application mode off.
ESC
<
Enter VT220 mode.
ESC
Z
Identify terminal.
ESC
Y
line col
Cursor position.
Copyright 2010-2013 Schellenbach & Assoc., Inc.
AccuTerm 7 Reference 259
260 AccuTerm 7 Help
3.4.1
ANSI Tables
3.4.1.1
ANSI Attribute Code Table
The ANSI Attribute Code Table defines the attribute code character (
n
) used by the ANSI emulations to assign visual attributes.
Code (
n
) Attribute type
0
1
2
Normal
Bold
Dim
4
5
7
8
22
24
Underline
Blinking
Reverse
Blank
Dim & Bold off
Underline off
25
27
28
30
31
32
33
34
Blinking off
Reverse off
Blank off
Black character
Red character
Green character
Yellow character
Blue character
35
36
37
40
41
42
43
44
45
46
47
Magenta character
Cyan character
White character
Black background
Red background
Green background
Yellow background
Blue background
Magenta background
Cyan background
White background
3.4.1.2
ANSI Function Key Table
The ANSI Function Key Table defines the key code (
key
) used by the ANSI emulations to program function keys.
F7
F8
F9
Key to program
F6
key
17
18
19
20
Copyright 2010-2013 Schellenbach & Assoc., Inc.
AccuTerm 7 Reference 261
Key to program
F10
F15
F16
F17
F18
F11
F12
F13
F14
F19
F20
31
32
33
34
25
26
28
29
key
21
23
24
3.4.1.3
ANSI Extended Key Table
The ANSI Extended Key Table defines the key code (
key
) and modifier keys (
mod
) used by the ANSI emulations to program extended function and keypad keys.
83
84
110
42
108
85
86
79
89
75
76
80
81
118
119
120
121
122
123
14
16
key
112
113
114
115
116
117
Key to program
F1
F2
F3
F4
BKSP
TAB
INS
DEL
HOME
END
PGUP
PGDN
F9
F10
F11
F12
F5
F6
F7
F8
LEFT
RIGHT
UP
DOWN
ESC
ENTER
KPD ENTER
Modifier keys none
SHIFT
ALT
ALT+SHIFT
CTRL
SHIFT+CTRL
ALT+CTRL
ALT+CTRL+SHIFT
5
6
3
4
7
8
mod
0
2
Copyright 2010-2013 Schellenbach & Assoc., Inc.
262 AccuTerm 7 Help
3.4.1.4
ANSI Key Code Table
The ANSI Key Code Table describes the default character sequence transmitted by the function, keypad and other special keys on the PC keyboard and the corresponding real terminal key.
PC Key
BKSP
SHIFT+BKSP
TAB
SHIFT+TAB
INS
F8
F9
F10
F11
F4
F5
F6
F7
F12
SHIFT+INS
DEL
SHIFT+DEL
HOME
SHIFT+HOME
END
SHIFT+END
PGUP
SHIFT+PGUP
PGDN
SHIFT+PGDN
LEFT
SHIFT+LEFT
RIGHT
SHIFT+RIGHT
UP
SHIFT+UP
DOWN
SHIFT+DOWN
ESC
SHIFT+ESC
ENTER
SHIFT+ENTER
KPD ENTER
SHIFT+KPD ENTER
F1
F2
F3
F6
F7
F8
F9
F10
F11
F12
Terminal Key
BKSP
SHIFT+BKSP
TAB
SHIFT+TAB
DEL
DEL LINE
HOME
SHIFT+HOME
PGUP
SHIFT+PGUP
PGDN
SHIFT+PGDN
LEFT
SHIFT+LEFT
RIGHT
SHIFT+RIGHT
UP
SHIFT+UP
DOWN
SHIFT+DOWN
ESC
SHIFT+ESC
RETURN
SHIFT+ENTER
ENTER
SHIFT+ENTER
PF1
PF2
PF3
PF4
Sequence
BS
BS
HT
CSI
Z
CSI
2 ~
CSI
2 ~
DEL
DEL
CSI
H
CSI
H
CSI
1 ~
CSI
1 ~
CSI
5 ~
CSI
5 ~
CSI
6 ~
CSI
6 ~
CSI
D
CSI
D
CSI
C
CSI
C
CSI
A
CSI
A
CSI
B
CSI
B
ESC
ESC
CR
CR
CR
CR
SS3
P
SS3
Q
SS3
R
SS3
S
CSI
M
CSI
1 7 ~
CSI
1 8 ~
CSI
1 9 ~
CSI
2 0 ~
CSI
2 1 ~
CSI
2 3 ~
CSI
2 4 ~
Copyright 2010-2013 Schellenbach & Assoc., Inc.
Download
Advertisement