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