Annotation of 43BSDReno/usr.bin/tn3270/map3270.5, revision 1.1.1.1

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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.