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