Release 4.1
[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.\"
d43d1075 16.\" @(#)map3270.5 4.1 (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
25When emulating IBM-syle 3270 terminals under UNIX (see \fItn3270\fR(1)),
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
43 1.) that the first character of the sequence be outside of the
44 standard ascii printable characters;
45.sp
46 2.) that no one sequence \fIbe\fR an initial part of another (although
47 sequences may \fIshare\fR initial parts).
48.sp
49.fi
50.SH FORMAT
51The file consists of entries for various terminals. The first part
52of an entry lists the names of the terminals which use that entry.
53These names should be the same as in
54.I /etc/termcap
55(see \fItermcap\fR(5));
56note that often the terminals from various termcap entries will all
57use the same
58.I map3270
59entry; for example, both 925 and 925vb (for
60925 with visual bells) would probably use the same
61.I map3270
62entry.
63After the names, separated by vertical bars (`|'), comes a left
64brace (`{'); the definitions; and, finally, a right brace
65(`}').
66.PP
67The definitions consist of a reserved keyword (see list below) which
68identifies the 3270 function (extended as defined below), followed
69by an equal sign (`='), followed by the various ways to generate
70this particular function, followed by a semi-colon (`;').
71Each way is a sequence of strings of
72.I printable
73ascii characters enclosed inside single quotes (`\(aa');
74various ways (options) are separated by vertical bars (`|').
75.PP
76Inside the single quotes, a few characters are special.
77A caret
78(`^') specifies that the next character is
79the ``control'' character of whatever the character is.
80So, `^a'
81represents control-a, ie: hexadecimal 1
82(note that `^A' would generate the same code).
83To generate
84.B rubout,
85one enters `^?'.
86To represent a control character inside a file
87requires using the caret to represent a control sequence;
88simply typing control-A will not work.
89Note: the ctrl-caret sequence
90(to generate a hexadecimal 1E)
91is represented as `^^' (not `^\e^').
92.PP
93In addition to the caret, a letter may be preceeded by a backslash (`\e').
94Since this has little effect for most characters,
95its use is usually not recommended.
96For the case of a single quote (`\(aa'), the backslash
97prevents that single quote from terminating the string.
98To have the backslash be part of the string, it is necessary to
99place two backslashes ('\e\e') in the file.
100.PP
101In addition, the following characters are special:
102.sp
103.nf
104.in +0.5i
105`\eE' means an escape character;
106`\en' means newline;
107`\et' means tab;
108`\er' means carriage return.
109.in -0.5i
110.fi
111.sp
112It is not necessary for each character in a string
113to be enclosed within single quotes.
114`\eE\eE\eE' means three escape characters.
115.PP
116Comments, which may appear anywhere on a line,
117begin with a hash mark (`#'), and terminate
118at the end of that line.
119However, comments cannot begin inside a quoted string;
120a hash mark inside a quoted string has no special meaning.
121.PP
122.SH 3270 KEYS SUPPORTED
123The following is the list of 3270 key names that are supported in this file.
124Note that some of the keys don't really exist on a 3270.
125In particular, the developers of this file have relied
126extensively on the work at the Yale University Computer Center with
127their 3270 emulator which runs in an IBM Series/1 front end.
128The following list corresponds closely to the functions
129that the developers of the Yale code offer in their product.
130.sp
131.B In the following list, the
132.B starred ("*")
133.B functions are not supported by
134.IR tn3270 (1).
135An unsupported function will cause
136.IR tn3270(1)
137to send a bell sequence to the user's terminal.
138.sp
139.nf
140 3270 Key Name Functional description
141
142 (*)LPRT local print
143 DP dup character
144 FM field mark character
145 (*)CURSEL cursor select
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
293 Erase current field control-u
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
GM
311.PP
312The definition of "word" (for "word delete", "word tab") should be a run-time
313option. Currently it is defined as the kernel tty driver defines it (strings
314of non-blanks); more than one person would rather use the "vi" definition
315(strings of specials, strings of alphanumeric).