1 .\" $NetBSD: map3270.5,v 1.11 2002/10/02 11:17:41 wiz Exp $
3 .\" Copyright (c) 1986 The Regents of the University of California.
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" from: @(#)map3270.5 4.5 (Berkeley) 7/31/91
31 .\" $NetBSD: map3270.5,v 1.11 2002/10/02 11:17:41 wiz Exp $
33 .TH MAP3270 5 "July 31, 1991"
36 map3270 \- database for mapping ascii keystrokes into IBM 3270 keys
40 When emulating IBM-style 3270 terminals under \s-1UNIX\s0 (see \fItn3270\fR(1)),
41 a mapping must be performed between sequences of keys hit on
42 a user's (ascii) keyboard, and the keys that are
43 available on a 3270. For example, a 3270 has a key labeled
45 which erases the contents of the current field from the
46 location of the cursor to the end.
47 In order to accomplish this function,
48 the terminal user and a program emulating a 3270 must
49 agree on what keys will be typed
54 The requirements for these sequences are:
58 1) that the first character of the sequence be outside of the
59 standard ascii printable characters;
61 2) that no sequence \fIbe\fR an initial part of another (although
62 sequences may \fIshare\fR initial parts).
66 The file consists of entries for various keyboards. The first part
67 of an entry lists the names of the keyboards which use that entry.
68 These names will often be the same as in
69 .I /usr/share/misc/termcap
72 however, note that often the terminals from various termcap entries will all
75 entry; for example, both 925 and 925vb (for
76 925 with visual bells) would probably use the same
79 Additionally, there are occasions when the terminal type defines
80 a window manager, and it will then be necessary to specify a
81 keyboard name (via the
83 environment variable) as the name of the entry.
84 After the names, separated by vertical bars (`|'), comes a left
85 brace (`{'); the definitions; and, finally, a right brace
88 Each definition consists of a reserved keyword (see list below) which
89 identifies the 3270 function (extended as defined below), followed
90 by an equal sign (`='), followed by the various ways to generate
91 this particular function, followed by a semi-colon (`;').
92 Each way is a sequence of strings of
94 ascii characters enclosed inside single quotes (`\(aa');
95 various ways (alternatives) are separated by vertical bars (`|').
97 Inside the single quotes, a few characters are special.
99 (`^') specifies that the next character is
100 the ``control'' character of whatever the character is.
102 represents control-a, ie: hexadecimal 1
103 (note that `^A' would generate the same code).
108 To represent a control character inside a file
109 requires using the caret to represent a control sequence;
110 simply typing control-A will not work.
111 Note: the ctrl-caret sequence
112 (to generate a hexadecimal 1E)
113 is represented as `^^' (not `^\e^').
115 In addition to the caret, a letter may be preceded by a backslash (`\e').
116 Since this has little effect for most characters,
117 its use is usually not recommended.
118 For the case of a single quote (`\(aa'), the backslash
119 prevents that single quote from terminating the string.
120 For the case of a caret (`^'), the backslash prevents
121 the caret from having its special meaning.
122 To have the backslash be part of the string, it is necessary to
123 place two backslashes ('\e\e') in the file.
125 In addition, the following characters are special:
129 `\eE' means an escape character;
132 `\er' means carriage return.
136 It is not necessary for each character in a string
137 to be enclosed within single quotes.
138 `\eE\eE\eE' means three escape characters.
140 Comments, which may appear anywhere on a line,
141 begin with a hash mark (`#'), and terminate
142 at the end of that line.
143 However, comments cannot begin inside a quoted string;
144 a hash mark inside a quoted string has no special meaning.
146 .SH 3270 KEYS SUPPORTED
147 The following is the list of 3270 key names that are supported in this file.
148 Note that some of the keys don't really exist on a 3270.
149 In particular, the developers of this file have relied
150 extensively on the work at the Yale University Computer Center with
151 their 3270 emulator which runs in an IBM Series/1 front end.
152 The following list corresponds closely to the functions
153 that the developers of the Yale code offer in their product.
155 .B In the following list, the
157 .B functions are not supported by
159 An unsupported function will cause
161 to send a (possibly visual) bell sequence to the user's terminal.
164 3270 Key Name Functional description
168 FM field mark character
170 CENTSIGN EBCDIC cent sign
171 RESHOW redisplay the screen
173 EEOF erase end of field
174 DELETE delete character
175 INSRT toggle insert mode
179 COLBAK column back tab
180 INDENT indent one tab stop
181 UNDENT undent one tab stop
188 SETTAB set a column tab
189 DELTAB delete a columntab
190 SETMRG set left margin
191 SETHOM set home position
192 CLRTAB clear all column tabs
195 (*)APLEND treat input as ascii
197 (*)PCOFF xon/xoff off
198 DISC disconnect (suspend)
199 (*)INIT new terminal type
200 (*)ALTK alternative keyboard dvorak
202 ERASE erase last character
203 WERASE erase last word
205 SYNCH we are in synch with the user
206 RESET reset key-unlock keyboard
207 MASTER_RESET reset, unlock and redisplay
208 (*)XOFF please hold output
209 (*)XON please give me output
210 ESCAPE enter telnet command mode
211 WORDTAB tab to beginning of next word
212 WORDBACKTAB tab to beginning of current/last word
213 WORDEND tab to end of current/next word
214 FIELDEND tab to last non-blank of current/next
215 unprotected (writable) field.
217 PA1 program attention 1
218 PA2 program attention 2
219 PA3 program attention 3
221 CLEAR local clear of the 3270 screen
225 PFK1 program function key 1
226 PFK2 program function key 2
228 PFK36 program function key 36
230 The following entry is used by
231 tn3270(1) when unable to locate a reasonable version in the
232 user's environment and in /usr/share/misc/map3270:
235 name { # actual name comes from TERM variable
239 delete = '^d' | '^?'; # note that '^?' is delete (rubout)
257 # program attention keys
258 pa1 = '^p1'; pa2 = '^p2'; pa3 = '^p3';
259 # program function keys
260 pfk1 = '\eE1'; pfk2 = '\eE2'; pfk3 = '\eE3'; pfk4 = '\eE4';
261 pfk5 = '\eE5'; pfk6 = '\eE6'; pfk7 = '\eE7'; pfk8 = '\eE8';
262 pfk9 = '\eE9'; pfk10 = '\eE0'; pfk11 = '\eE-'; pfk12 = '\eE=';
263 pfk13 = '\eE!'; pfk14 = '\eE@'; pfk15 = '\eE#'; pfk16 = '\eE$';
264 pfk17 = '\eE%'; pfk18 = '\eE'; pfk19 = '\eE\*[Am]'; pfk20 = '\eE*';
265 pfk21 = '\eE('; pfk22 = '\eE)'; pfk23 = '\eE_'; pfk24 = '\eE+';
268 .SH "IBM 3270 KEY DEFINITIONS FOR AN ABOVE DEFINITION"
269 The charts below show the proper keys to emulate
270 each 3270 function when using the default key mapping supplied
277 Command Keys IBM 3270 Key Default Key(s)
281 New Line control-n or
285 Cursor Left control-h
286 Cursor Right control-l
288 Cursor Down control-j or
291 Delete Char control-d or
294 Erase Input control-w
295 Insert Mode ESC Space
297 Program Function Keys
308 Program Attention Keys
313 Reset After Error control-r
314 Purge Input Buffer control-x
315 Keyboard Unlock control-t
316 Redisplay Screen control-v
318 Erase current field control-u
321 /usr/share/misc/map3270
323 tn3270(1), mset(1), \fIYale ASCII Terminal Communication
324 System II Program Description/Operator's Manual\fR
330 doesn't yet understand how to process all the functions
333 when such a function is requested
337 The definition of "word" (for "word erase", "word tab") should be a run-time
338 option. Currently it is defined as the kernel tty driver defines it (strings
339 of non-whitespace); more than one person would rather use the "vi" definition
340 (strings of specials, strings of alphanumeric).