.\" Copyright (c) 1986 The Regents of the University of California.
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" @(#)map3270.5 4.5 (Berkeley) 7/31/91
.TH MAP3270 5 "July 31, 1991"
map3270 \- database for mapping ascii keystrokes into IBM 3270 keys
When emulating IBM-syle 3270 terminals under \s-1UNIX\s0 (see \fItn3270\fR(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
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
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 sequence \fIbe\fR an initial part of another (although
sequences may \fIshare\fR initial parts).
The file consists of entries for various keyboards. The first part
of an entry lists the names of the keyboards which use that entry.
These names will often be the same as in
however, note that often the terminals from various termcap entries will all
entry; for example, both 925 and 925vb (for
925 with visual bells) would probably use the same
Additionally, there are occasions when the terminal type defines
a window manager, and it will then be necessary to specify a
environment variable) as the name of the entry.
After the names, separated by vertical bars (`|'), comes a left
brace (`{'); the definitions; and, finally, a right brace
Each definition consists 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, followed by a semi-colon (`;').
Each way is a sequence of strings of
ascii characters enclosed inside single quotes (`\(aa');
various ways (alternatives) are separated by vertical bars (`|').
Inside the single quotes, a few characters are special.
(`^') specifies that the next character is
the ``control'' character of whatever the character is.
represents control-a, ie: hexadecimal 1
(note that `^A' would generate the same code).
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 `^\e^').
In addition to the caret, a letter may be preceeded by a backslash (`\e').
Since this has little effect for most characters,
its use is usually not recommended.
For the case of a single quote (`\(aa'), the backslash
prevents that single quote from terminating the string.
For the case of a caret (`^'), the backslash prevents
the caret from having its special meaning.
To have the backslash be part of the string, it is necessary to
place two backslashes ('\e\e') in the file.
In addition, the following characters are special:
`\eE' means an escape character;
`\er' means carriage return.
It is not necessary for each character in a string
to be enclosed within single quotes.
`\eE\eE\eE' means three escape characters.
Comments, which may appear anywhere on a line,
begin with a hash mark (`#'), and terminate
However, comments cannot begin inside a quoted string;
a hash mark inside a quoted string has no special meaning.
The following is the list of 3270 key names that are supported 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.
.B In the following list, the
.B functions are not supported by
An unsupported function will cause
to send a (possibly visual) bell sequence to the user's terminal.
3270 Key Name Functional description
CENTSIGN EBCDIC cent sign
RESHOW redisplay the screen
INDENT indent one tab stop
UNDENT undent one tab stop
DELTAB delete a columntab
CLRTAB clear all column tabs
(*)APLEND treat input as ascii
DISC disconnect (suspend)
(*)INIT new terminal type
(*)ALTK alternate keyboard dvorak
ERASE erase last character
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.
CLEAR local clear of the 3270 screen
PFK1 program function key 1
PFK2 program function key 2
PFK36 program function key 36
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
delete = '^d' | '^?'; # note that '^?' is delete (rubout)
pa1 = '^p1'; pa2 = '^p2'; pa3 = '^p3';
pfk1 = '\eE1'; pfk2 = '\eE2'; pfk3 = '\eE3'; pfk4 = '\eE4';
pfk5 = '\eE5'; pfk6 = '\eE6'; pfk7 = '\eE7'; pfk8 = '\eE8';
pfk9 = '\eE9'; pfk10 = '\eE0'; pfk11 = '\eE-'; pfk12 = '\eE=';
pfk13 = '\eE!'; pfk14 = '\eE@'; pfk15 = '\eE#'; pfk16 = '\eE$';
pfk17 = '\eE%'; pfk18 = '\eE'; pfk19 = '\eE&'; pfk20 = '\eE*';
pfk21 = '\eE('; pfk22 = '\eE)'; pfk23 = '\eE_'; pfk24 = '\eE+';
.SH "IBM 3270 KEY DEFINITONS FOR AN ABOVE DEFINITION"
The charts below show the proper keys to emulate
each 3270 function when using the default key mapping supplied
Command Keys IBM 3270 Key Default Key(s)
Reset After Error control-r
Purge Input Buffer control-x
Keyboard Unlock control-t
Redisplay Screen control-v
Erase current field control-u
tn3270(1), mset(1), \fIYale ASCII Terminal Communication
System II Program Description/Operator's Manual\fR
doesn't yet understand how to process all the functions
when such a function is requested
The definition of "word" (for "word erase", "word tab") should be a run-time
option. Currently it is defined as the kernel tty driver defines it (strings
of non-whitespace); more than one person would rather use the "vi" definition
(strings of specials, strings of alphanumeric).