BSD 4_3_Tahoe development
[unix-history] / usr / man / cat5 / map3270.0
MAP3270(5) UNIX Programmer's Manual MAP3270(5)
N\bNA\bAM\bME\bE
map3270 - database for mapping ascii keystrokes into IBM
3270 keys
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
/\b/e\bet\btc\bc/\b/m\bma\bap\bp3\b32\b27\b70\b0
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
When emulating IBM-syle 3270 terminals under UNIX (see
_\bt_\bn_\b3_\b2_\b7_\b0(1)), a mapping must be performed between sequences of
keys hit on a user's (ascii) keyboard, and the keys that are
available on a 3270. For example, a 3270 has a key labeled
E\bEE\bEO\bOF\bF which erases the contents of the current field from the
location of the cursor to the end. In order to accomplish
this function, the terminal user and a program emulating a
3270 must agree on what keys will be typed to invoke the
E\bEE\bEO\bOF\bF function.
The requirements for these sequences are:
1.) that the first character of the sequence be outside of the
standard ascii printable characters;
2.) that no one sequence _\bb_\be an initial part of another (although
sequences may _\bs_\bh_\ba_\br_\be initial parts).
F\bFO\bOR\bRM\bMA\bAT\bT
The file consists of entries for various terminals. The
first part of an entry lists the names of the terminals
which use that entry. These names should be the same as in
/_\be_\bt_\bc/_\bt_\be_\br_\bm_\bc_\ba_\bp (see _\bt_\be_\br_\bm_\bc_\ba_\bp(5)); note that often the terminals
from various termcap entries will all use the same _\bm_\ba_\bp_\b3_\b2_\b7_\b0
entry; for example, both 925 and 925vb (for 925 with visual
bells) would probably use the same _\bm_\ba_\bp_\b3_\b2_\b7_\b0 entry. After the
names, separated by vertical bars (`|'), comes a left brace
(`{'); the definitions; and, finally, a right brace (`}').
The definitions consist of a reserved keyword (see list
below) which identifies the 3270 function (extended as
defined below), followed by an equal sign (`='), followed by
the various ways to generate this particular function, fol-
lowed by a semi-colon (`;'). Each way is a sequence of
strings of _\bp_\br_\bi_\bn_\bt_\ba_\bb_\bl_\be ascii characters enclosed inside single
quotes (`''); various ways (options) are separated by verti-
cal bars (`|').
Inside the single quotes, a few characters are special. A
caret (`^') specifies that the next character is the ``con-
trol'' character of whatever the character is. So, `^a'
represents control-a, ie: hexadecimal 1 (note that `^A'
would generate the same code). To generate r\bru\bub\bbo\bou\but\bt,\b, one
Printed 7/9/88 January 11, 1986 1
MAP3270(5) UNIX Programmer's Manual MAP3270(5)
enters `^?'. To represent a control character inside a file
requires using the caret to represent a control sequence;
simply typing control-A will not work. Note: the ctrl-caret
sequence (to generate a hexadecimal 1E) is represented as
`^^' (not `^\^').
In addition to the caret, a letter may be preceeded by a
backslash (`\'). Since this has little effect for most
characters, its use is usually not recommended. For the
case of a single quote (`''), the backslash prevents that
single quote from terminating the string. To have the
backslash be part of the string, it is necessary to place
two backslashes ('\\') in the file.
In addition, the following characters are special:
`\E' means an escape character;
`\n' means newline;
`\t' means tab;
`\r' means carriage return.
It is not necessary for each character in a string to be
enclosed within single quotes. `\E\E\E' means three escape
characters.
Comments, which may appear anywhere on a line, begin with a
hash mark (`#'), and terminate at the end of that line.
However, comments cannot begin inside a quoted string; a
hash mark inside a quoted string has no special meaning.
3\b32\b27\b70\b0 K\bKE\bEY\bYS\bS S\bSU\bUP\bPP\bPO\bOR\bRT\bTE\bED\bD
The following is the list of 3270 key names that are sup-
ported in this file. Note that some of the keys don't
really exist on a 3270. In particular, the developers of
this file have relied extensively on the work at the Yale
University Computer Center with their 3270 emulator which
runs in an IBM Series/1 front end. The following list
corresponds closely to the functions that the developers of
the Yale code offer in their product.
I\bIn\bn t\bth\bhe\be f\bfo\bol\bll\blo\bow\bwi\bin\bng\bg l\bli\bis\bst\bt,\b, t\bth\bhe\be s\bst\bta\bar\brr\bre\bed\bd (\b("\b"*\b*"\b")\b) f\bfu\bun\bnc\bct\bti\bio\bon\bns\bs a\bar\bre\be n\bno\bot\bt
s\bsu\bup\bpp\bpo\bor\brt\bte\bed\bd b\bby\by _\bt_\bn_\b3_\b2_\b7_\b0(1). An unsupported function will cause
_\bt_\bn_\b3_\b2_\b7_\b0(_\b1) to send a bell sequence to the user's terminal.
3270 Key Name Functional description
(*)LPRT local print
DP dup character
FM field mark character
(*)CURSEL cursor select
RESHOW redisplay the screen
EINP erase input
Printed 7/9/88 January 11, 1986 2
MAP3270(5) UNIX Programmer's Manual MAP3270(5)
EEOF erase end of field
DELETE delete character
INSRT toggle insert mode
TAB field tab
BTAB field back tab
COLTAB column tab
COLBAK column back tab
INDENT indent one tab stop
UNDENT undent one tab stop
NL new line
HOME home the cursor
UP up cursor
DOWN down cursor
RIGHT right cursor
LEFT left cursor
SETTAB set a column tab
DELTAB delete a columntab
SETMRG set left margin
SETHOM set home position
CLRTAB clear all column tabs
(*)APLON apl on
(*)APLOFF apl off
(*)APLEND treat input as ascii
(*)PCON xon/xoff on
(*)PCOFF xon/xoff off
DISC disconnect (suspend)
(*)INIT new terminal type
(*)ALTK alternate keyboard dvorak
FLINP flush input
ERASE erase last character
WERASE erase last word
FERASE erase field
SYNCH we are in synch with the user
RESET reset key-unlock keyboard
MASTER_RESET reset, unlock and redisplay
(*)XOFF please hold output
(*)XON please give me output
ESCAPE enter telnet command mode
WORDTAB tab to beginning of next word
WORDBACKTAB tab to beginning of current/last word
WORDEND tab to end of current/next word
FIELDEND tab to last non-blank of current/next
unprotected (writable) field.
PA1 program attention 1
PA2 program attention 2
PA3 program attention 3
CLEAR local clear of the 3270 screen
TREQ test request
ENTER enter key
Printed 7/9/88 January 11, 1986 3
MAP3270(5) UNIX Programmer's Manual MAP3270(5)
PFK1 program function key 1
PFK2 program function key 2
etc. etc.
PFK36 program function key 36
A\bA S\bSA\bAM\bMP\bPL\bLE\bE E\bEN\bNT\bTR\bRY\bY
The following entry is used by tn3270(1) when unable to
locate a reasonable version in the user's environment and in
/etc/map3270:
name { # actual name comes from TERM variable
clear = '^z';
flinp = '^x';
enter = '^m';
delete = '^d' | '^?'; # note that '^?' is delete (rubout)
synch = '^r';
reshow = '^v';
eeof = '^e';
tab = '^i';
btab = '^b';
nl = '^n';
left = '^h';
right = '^l';
up = '^k';
down = '^j';
einp = '^w';
reset = '^t';
xoff = '^s';
xon = '^q';
escape = '^c';
ferase = '^u';
insrt = 'E ';
# program attention keys
pa1 = '^p1'; pa2 = '^p2'; pa3 = '^p3';
# program function keys
pfk1 = 'E1'; pfk2 = 'E2'; pfk3 = 'E3'; pfk4 = 'E4';
pfk5 = 'E5'; pfk6 = 'E6'; pfk7 = 'E7'; pfk8 = 'E8';
pfk9 = 'E9'; pfk10 = 'E0'; pfk11 = 'E-'; pfk12 = 'E=';
pfk13 = 'E!'; pfk14 = 'E@'; pfk15 = 'E#'; pfk16 = 'E$';
pfk17 = 'E%'; pfk18 = 'E'; pfk19 = 'E&'; pfk20 = 'E*';
pfk21 = 'E('; pfk22 = 'E)'; pfk23 = 'E_'; pfk24 = 'E+';
}
I\bIB\bBM\bM 3\b32\b27\b70\b0 K\bKE\bEY\bY D\bDE\bEF\bFI\bIN\bNI\bIT\bTO\bON\bNS\bS F\bFO\bOR\bR A\bAN\bN A\bAB\bBO\bOV\bVE\bE D\bDE\bEF\bFI\bIN\bNI\bIT\bTI\bIO\bON\bN
The charts below show the proper keys to emulate each 3270
function when using the default key mapping supplied with
_\bt_\bn_\b3_\b2_\b7_\b0(1) and _\bm_\bs_\be_\bt(1).
Command Keys IBM 3270 Key Default Key(s)
Enter RETURN
Clear control-z
Cursor Movement Keys
Printed 7/9/88 January 11, 1986 4
MAP3270(5) UNIX Programmer's Manual MAP3270(5)
New Line control-n or
Home
Tab control-i
Back Tab control-b
Cursor Left control-h
Cursor Right control-l
Cursor Up control-k
Cursor Down control-j or
LINE FEED
Edit Control Keys
Delete Char control-d or
RUB
Erase EOF control-e
Erase Input control-w
Insert Mode ESC Space
End Insert ESC Space
Program Function Keys
PF1 ESC 1
PF2 ESC 2
... ...
PF10 ESC 0
PF11 ESC -
PF12 ESC =
PF13 ESC !
PF14 ESC @
... ...
PF24 ESC +
Program Attention Keys
PA1 control-p 1
PA2 control-p 2
PA3 control-p 3
Local Control Keys
Reset After Error control-r
Purge Input Buffer control-x
Keyboard Unlock control-t
Redisplay Screen control-v
Other Keys
Erase current field control-u
F\bFI\bIL\bLE\bES\bS
/etc/map3270
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
tn3270(1), mset(1), _\bY_\ba_\bl_\be _\bA_\bS_\bC_\bI_\bI _\bT_\be_\br_\bm_\bi_\bn_\ba_\bl _\bC_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\bi_\bo_\bn _\bS_\by_\bs_\bt_\be_\bm
_\bI_\bI _\bP_\br_\bo_\bg_\br_\ba_\bm _\bD_\be_\bs_\bc_\br_\bi_\bp_\bt_\bi_\bo_\bn/_\bO_\bp_\be_\br_\ba_\bt_\bo_\br'_\bs _\bM_\ba_\bn_\bu_\ba_\bl (IBM SB30-1911)
A\bAU\bUT\bTH\bHO\bOR\bR
Greg Minshall
B\bBU\bUG\bGS\bS
_\bT_\bn_\b3_\b2_\b7_\b0 doesn't yet understand how to process all the func-
tions available in _\bm_\ba_\bp_\b3_\b2_\b7_\b0; when such a function is
Printed 7/9/88 January 11, 1986 5
MAP3270(5) UNIX Programmer's Manual MAP3270(5)
requested _\bt_\bn_\b3_\b2_\b7_\b0 will beep at you.
The definition of "word" (for "word delete", "word tab")
should be a run-time option. Currently it is defined as the
kernel tty driver defines it (strings of non-blanks); more
than one person would rather use the "vi" definition
(strings of specials, strings of alphanumeric).
Printed 7/9/88 January 11, 1986 6