new copyright notice
[unix-history] / usr / src / usr.bin / tn3270 / mset / map3270.5
CommitLineData
70f58f09
KB
1.\" Copyright (c) 1986 The Regents of the University of California.
2.\" All rights reserved.
b5bef96d 3.\"
91cff1e1 4.\" %sccs.include.redist.man%
70f58f09 5.\"
91cff1e1 6.\" @(#)map3270.5 4.4 (Berkeley) %G%
b5bef96d
KM
7.\"
8.TH MAP3270 5 ""
9.UC 6
cfcb59fc
GM
10.SH NAME
11map3270 \- database for mapping ascii keystrokes into IBM 3270 keys
12.SH SYNOPSIS
dd13e0cd 13.B map3270
cfcb59fc 14.SH DESCRIPTION
449f67e9 15When emulating IBM-syle 3270 terminals under \s-UNIX\s0 (see \fItn3270\fR(1)),
cfcb59fc
GM
16a mapping must be performed between sequences of keys hit on
17a user's (ascii) keyboard, and the keys that are
18available on a 3270. For example, a 3270 has a key labeled
19.B EEOF
20which erases the contents of the current field from the
21location of the cursor to the end.
22In order to accomplish this function,
23the terminal user and a program emulating a 3270 must
24agree on what keys will be typed
25to invoke the
26.B EEOF
27function.
28.PP
29The requirements for these sequences are:
30.nf
31.ta 4n 9n
32.sp
449f67e9 33 1) that the first character of the sequence be outside of the
cfcb59fc
GM
34 standard ascii printable characters;
35.sp
449f67e9 36 2) that no sequence \fIbe\fR an initial part of another (although
cfcb59fc
GM
37 sequences may \fIshare\fR initial parts).
38.sp
39.fi
40.SH FORMAT
449f67e9
GM
41The file consists of entries for various keyboards. The first part
42of an entry lists the names of the keyboards which use that entry.
43These names will often be the same as in
cfcb59fc 44.I /etc/termcap
449f67e9
GM
45(see
46.IR termcap (5));
47however, note that often the terminals from various termcap entries will all
cfcb59fc
GM
48use the same
49.I map3270
50entry; for example, both 925 and 925vb (for
51925 with visual bells) would probably use the same
52.I map3270
53entry.
449f67e9
GM
54Additionally, there are occasions when the terminal type defines
55a window manager, and it will then be necessary to specify a
56keyboard name (via the
57.B KEYBD
58environment variable) as the name of the entry.
cfcb59fc
GM
59After the names, separated by vertical bars (`|'), comes a left
60brace (`{'); the definitions; and, finally, a right brace
61(`}').
62.PP
449f67e9 63Each definition consists of a reserved keyword (see list below) which
cfcb59fc
GM
64identifies the 3270 function (extended as defined below), followed
65by an equal sign (`='), followed by the various ways to generate
66this particular function, followed by a semi-colon (`;').
67Each way is a sequence of strings of
68.I printable
69ascii characters enclosed inside single quotes (`\(aa');
449f67e9 70various ways (alternatives) are separated by vertical bars (`|').
cfcb59fc
GM
71.PP
72Inside the single quotes, a few characters are special.
73A caret
74(`^') specifies that the next character is
75the ``control'' character of whatever the character is.
76So, `^a'
77represents control-a, ie: hexadecimal 1
78(note that `^A' would generate the same code).
79To generate
449f67e9
GM
80.B rubout
81(DEL),
cfcb59fc
GM
82one enters `^?'.
83To represent a control character inside a file
84requires using the caret to represent a control sequence;
85simply typing control-A will not work.
86Note: the ctrl-caret sequence
87(to generate a hexadecimal 1E)
88is represented as `^^' (not `^\e^').
89.PP
90In addition to the caret, a letter may be preceeded by a backslash (`\e').
91Since this has little effect for most characters,
92its use is usually not recommended.
93For the case of a single quote (`\(aa'), the backslash
94prevents that single quote from terminating the string.
449f67e9
GM
95For the case of a caret (`^'), the backslash prevents
96the caret from having its special meaning.
cfcb59fc
GM
97To have the backslash be part of the string, it is necessary to
98place two backslashes ('\e\e') in the file.
99.PP
100In addition, the following characters are special:
101.sp
102.nf
103.in +0.5i
104`\eE' means an escape character;
105`\en' means newline;
106`\et' means tab;
107`\er' means carriage return.
108.in -0.5i
109.fi
110.sp
111It is not necessary for each character in a string
112to be enclosed within single quotes.
113`\eE\eE\eE' means three escape characters.
114.PP
115Comments, which may appear anywhere on a line,
116begin with a hash mark (`#'), and terminate
117at the end of that line.
118However, comments cannot begin inside a quoted string;
119a hash mark inside a quoted string has no special meaning.
120.PP
121.SH 3270 KEYS SUPPORTED
122The following is the list of 3270 key names that are supported in this file.
123Note that some of the keys don't really exist on a 3270.
124In particular, the developers of this file have relied
125extensively on the work at the Yale University Computer Center with
126their 3270 emulator which runs in an IBM Series/1 front end.
127The following list corresponds closely to the functions
128that the developers of the Yale code offer in their product.
129.sp
130.B In the following list, the
131.B starred ("*")
132.B functions are not supported by
133.IR tn3270 (1).
134An unsupported function will cause
135.IR tn3270(1)
449f67e9 136to send a (possibly visual) bell sequence to the user's terminal.
cfcb59fc
GM
137.sp
138.nf
139 3270 Key Name Functional description
140
141 (*)LPRT local print
142 DP dup character
143 FM field mark character
449f67e9
GM
144 CURSEL cursor select
145 CENTSIGN EBCDIC cent sign
cfcb59fc
GM
146 RESHOW redisplay the screen
147 EINP erase input
148 EEOF erase end of field
149 DELETE delete character
150 INSRT toggle insert mode
151 TAB field tab
152 BTAB field back tab
153 COLTAB column tab
154 COLBAK column back tab
155 INDENT indent one tab stop
156 UNDENT undent one tab stop
157 NL new line
158 HOME home the cursor
159 UP up cursor
160 DOWN down cursor
161 RIGHT right cursor
162 LEFT left cursor
163 SETTAB set a column tab
164 DELTAB delete a columntab
165 SETMRG set left margin
166 SETHOM set home position
167 CLRTAB clear all column tabs
168 (*)APLON apl on
169 (*)APLOFF apl off
170 (*)APLEND treat input as ascii
171 (*)PCON xon/xoff on
172 (*)PCOFF xon/xoff off
173 DISC disconnect (suspend)
174 (*)INIT new terminal type
175 (*)ALTK alternate keyboard dvorak
176 FLINP flush input
177 ERASE erase last character
178 WERASE erase last word
179 FERASE erase field
180 SYNCH we are in synch with the user
181 RESET reset key-unlock keyboard
182 MASTER_RESET reset, unlock and redisplay
183 (*)XOFF please hold output
184 (*)XON please give me output
185 ESCAPE enter telnet command mode
3692533f
GM
186 WORDTAB tab to beginning of next word
187 WORDBACKTAB tab to beginning of current/last word
188 WORDEND tab to end of current/next word
189 FIELDEND tab to last non-blank of current/next
190 unprotected (writable) field.
cfcb59fc
GM
191
192 PA1 program attention 1
193 PA2 program attention 2
194 PA3 program attention 3
195
196 CLEAR local clear of the 3270 screen
197 TREQ test request
198 ENTER enter key
199
200 PFK1 program function key 1
201 PFK2 program function key 2
202 etc. etc.
203 PFK36 program function key 36
204.SH A SAMPLE ENTRY
205The following entry is used by
206tn3270(1) when unable to locate a reasonable version in the
207user's environment and in /etc/map3270:
208.sp
209.nf
210 name { # actual name comes from TERM variable
211 clear = '^z';
212 flinp = '^x';
213 enter = '^m';
214 delete = '^d' | '^?'; # note that '^?' is delete (rubout)
215 synch = '^r';
216 reshow = '^v';
217 eeof = '^e';
218 tab = '^i';
219 btab = '^b';
220 nl = '^n';
221 left = '^h';
222 right = '^l';
223 up = '^k';
224 down = '^j';
225 einp = '^w';
226 reset = '^t';
227 xoff = '^s';
228 xon = '^q';
229 escape = '^c';
230 ferase = '^u';
231 insrt = '\E ';
232 # program attention keys
233 pa1 = '^p1'; pa2 = '^p2'; pa3 = '^p3';
234 # program function keys
235 pfk1 = '\E1'; pfk2 = '\E2'; pfk3 = '\E3'; pfk4 = '\E4';
236 pfk5 = '\E5'; pfk6 = '\E6'; pfk7 = '\E7'; pfk8 = '\E8';
237 pfk9 = '\E9'; pfk10 = '\E0'; pfk11 = '\E-'; pfk12 = '\E=';
238 pfk13 = '\E!'; pfk14 = '\E@'; pfk15 = '\E#'; pfk16 = '\E$';
239 pfk17 = '\E%'; pfk18 = '\E'; pfk19 = '\E&'; pfk20 = '\E*';
240 pfk21 = '\E('; pfk22 = '\E)'; pfk23 = '\E_'; pfk24 = '\E+';
241 }
242.fi
243.SH "IBM 3270 KEY DEFINITONS FOR AN ABOVE DEFINITION"
244The charts below show the proper keys to emulate
245each 3270 function when using the default key mapping supplied
246with
247.IR tn3270 (1)
248and
249.IR mset (1).
250.sp
251.nf
252 Command Keys IBM 3270 Key Default Key(s)
253 Enter RETURN
254 Clear control-z
255 Cursor Movement Keys
256 New Line control-n or
257 Home
258 Tab control-i
259 Back Tab control-b
260 Cursor Left control-h
261 Cursor Right control-l
262 Cursor Up control-k
263 Cursor Down control-j or
264 LINE FEED
265 Edit Control Keys
266 Delete Char control-d or
267 RUB
268 Erase EOF control-e
269 Erase Input control-w
270 Insert Mode ESC Space
271 End Insert ESC Space
272 Program Function Keys
273 PF1 ESC 1
274 PF2 ESC 2
275 ... ...
276 PF10 ESC 0
277 PF11 ESC -
278 PF12 ESC =
279 PF13 ESC !
280 PF14 ESC @
281 ... ...
282 PF24 ESC +
283 Program Attention Keys
284 PA1 control-p 1
285 PA2 control-p 2
286 PA3 control-p 3
287 Local Control Keys
288 Reset After Error control-r
289 Purge Input Buffer control-x
290 Keyboard Unlock control-t
291 Redisplay Screen control-v
292 Other Keys
449f67e9 293 Erase current field control-u
cfcb59fc
GM
294.fi
295.SH FILES
296/etc/map3270
297.SH SEE ALSO
298tn3270(1), mset(1), \fIYale ASCII Terminal Communication
299System II Program Description/Operator's Manual\fR
300(IBM SB30-1911)
301.SH AUTHOR
302Greg Minshall
303.SH BUGS
304.I Tn3270
305doesn't yet understand how to process all the functions
306available in
307.I map3270;
308when such a function is requested
309.I tn3270
310will beep at you.
3692533f 311.PP
449f67e9 312The definition of "word" (for "word erase", "word tab") should be a run-time
3692533f 313option. Currently it is defined as the kernel tty driver defines it (strings
449f67e9 314of non-whitespace); more than one person would rather use the "vi" definition
3692533f 315(strings of specials, strings of alphanumeric).