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