Annotation of cci/usr/src/usr.bin/bsc/doc/emhelp.txt, revision 1.1.1.1

1.1       root        1: .RP
                      2: .TL
                      3: How to Set Up Termcap Entries for EM3277 Keyboard Mapping
                      4: .AU
                      5: Risa Galant
                      6: .AI
                      7: D. L. Buck and Associates, Inc.
                      8: .AB
                      9: .PP
                     10: The IBM 3277 terminal keyboard has many special-purpose keys unique
                     11: to it which are used by applications programs interfacing
                     12: with it.
                     13: To properly emulate the terminal, there must be a general way to
                     14: define and enter equivalents of those keys on non-IBM terminals.
                     15: This paper describes a method for doing this.
                     16: .FS
                     17: DLBA @(#)emhelp.txt    1.6 
                     18: .FE
                     19: .PP
                     20: The EM3277 package allows the system administrator or installer to
                     21: define a keyboard mapping arrangement for most ASCII asynchronous
                     22: terminals such that function keys available on that terminal may be
                     23: used to emulate other keys on the IBM terminal.
                     24: Definitions for those special keys must be placed in the 
                     25: .I /etc/termcap
                     26: file, a special terminal capability database which is also used to define
                     27: the asynchronous terminal's control sequences for cursor positioning,
                     28: highlighting data, and other special features.
                     29: .AE
                     30: .LP
                     31: .I /etc/termcap
                     32: is a database which decribes terminals by describing their capabilities and
                     33: how operations are performed on them.
                     34: It is used by screen editor
                     35: .I vi
                     36: and utility library
                     37: .I curses
                     38: to determine what various character sequences sent from a
                     39: terminal mean. Used with the
                     40: .I curses
                     41: library, it allows applications programs to be terminal-independent
                     42: but still invoke screen-oriented actions such as cursor positioning,
                     43: screen erasing, and highlighting.
                     44: .LP
                     45: .I Em3277
                     46: has a
                     47: .I help
                     48: function which examines
                     49: .I /etc/termcap
                     50: entries to display a map of the keys on a 
                     51: terminal which correspond to 3270 function keys.
                     52: When the user answers the question:
                     53: .DS
                     54: Would you like help? (Y/N):
                     55: .DE
                     56: .LP
                     57: with a lower- or upper-case 'y', the following keyboard map is displayed if
                     58: the proper
                     59: .I /etc/termcap
                     60: entries have been made:
                     61: .LP
                     62: .TS
                     63: center,box;
                     64: c s s s
                     65: c s s s
                     66: c s s s
                     67: l l|l l.
                     68: Terminal: <termtype>
                     69: The keyboard map for your terminal is as follows: 
                     70: 
                     71: 3270 Name      [termtype] Key  3270 Name       [termtype] Key
                     72: _
                     73: RESET  [keyname]       PF7     [keyname]
                     74: ENTER  [keyname]       PF8     [keyname]
                     75: CLEAR  [keyname]       PF9     [keyname]
                     76: BACKTAB        [keyname]       PF10    [keyname]
                     77: ERASE-EOF      [keyname]       PF11    [keyname]
                     78: ERASE-INP      [keyname]       PF12    [keyname]
                     79: INSERT [keyname]       Shell cmd       [special key],![cmd]
                     80: DELETE [keyname]       FM      [keyname]
                     81: PA1    [keyname]       DUP     [keyname]
                     82: PA2    [keyname]       Stats   [special key],s
                     83: PA3    [keyname]       Exit    [special key],q
                     84: PF1    [keyname]       TAB     [keyname]
                     85: PF2    [keyname]
                     86: PF3    [keyname]       Resetkey        [keyname]
                     87: PF4    [keyname]       Help Key        [keyname]
                     88: PF5    [keyname]       Stat Key        [keyname]
                     89: PF6    [keyname]       Printkey        [keyname]
                     90: .TE
                     91: .LP
                     92: The name of the terminal for which the map is made is substituted for
                     93: .I termtype.
                     94: The names of keys on that terminal which are used to perform the 3270 functions
                     95: listed are substituted for 
                     96: .I keyname.
                     97: .LP
                     98: The system administrator or installer must make entries in
                     99: .I /etc/termcap
                    100: defining the character sequence generated by the key being
                    101: mapped to perform a particular 3270 function,
                    102: and the name of the key which generates that sequence. If a
                    103: particular 3270 function isn't being used (no entry has been made for it
                    104: in
                    105: .I /etc/termcap),
                    106: "No Assignment" is displayed for the keyname. 
                    107: .LP
                    108: Sequence
                    109: entries in 
                    110: .I /etc/termcap
                    111: are noted and saved in a table by
                    112: .I em3277's
                    113: set up routine. When the sequence arrives at the terminal (the user presses
                    114: the key which generates the sequence)
                    115: .I em3277
                    116: looks it up in the table and matches it with the function to be performed.
                    117: Name entries in
                    118: .I /etc/termcap
                    119: are used by the 
                    120: .I em_help
                    121: routine to display the name of the key which, when pressed, will cause 
                    122: .I em3277
                    123: to perform the function. 
                    124: .LP
                    125: Sequence entries are made as follows:
                    126: .ID
                    127: S<i>=<sequence>
                    128: .DE
                    129: where
                    130: .I <i>
                    131: is a one-character index, 0-z, and 
                    132: .I <sequence>
                    133: is the sequence of characters generated by the key. 
                    134: .LP
                    135: Name entries are made as follows:
                    136: .ID
                    137: N<i>=<key name>
                    138: .DE
                    139: where
                    140: .I <i>
                    141: is a one-character index, 0-z, 
                    142: and
                    143: .I
                    144: <key name>
                    145: .R
                    146: is the name of the key which generates the sequence.
                    147: .LP
                    148: .I em_help
                    149: constructs key name labels and, using 
                    150: .I termcap
                    151: functions, retrieves them from the
                    152: .I termcap
                    153: database
                    154: .I (/etc/termcap).
                    155: .LP
                    156: 3270 function keys should be defined as follows:
                    157: .LP
                    158: .TS
                    159: center,box;
                    160: l|c|l|c|l|c|l|c.
                    161: Termcap Name   Function        Label   Termcap Name    Function        Label
                    162: _
                    163: S0     RESET   N0      P5      PF5     Nf
                    164: S1     ENTER   N1      P6      PF6     Ng
                    165: S2     CLEAR   N2      P7      PF7     Nh
                    166: S3     BACKTAB N3      P8      PF8     Nj
                    167: S4     ERASE_EOF       N4      P9      PF9     Nk
                    168: S5     ERASE_INP       N5      Pa      PF10    Nm
                    169: S6     INSERT  N6      Pb      PF11    Nn
                    170: S7     DELETE  N7      Pc      PF12    No
                    171: A1     PA1     N8      S0      Shell Command   Np
                    172: A2     PA2     N9      S9      FM      Nq
                    173: A3     PA3     Na      S8      DUP     Nr
                    174: P1     PF1     Nb      S0      Statistics      Ns
                    175: P2     PF2     Nc      S0      Exit    Nt
                    176: P3     PF3     Nd      tc      TAB     Nu
                    177: P4     PF4     Ne      SZ      Resetkey        NZ
                    178: SH     Helpkey NH      ST      Statkey NT
                    179: SP     Printkey        NP
                    180: .TE
                    181: .LP
                    182: To illustrate, let's say that your terminal's keyboard has some function
                    183: keys, F1 through F10, which you'd like to use as 3270 function keys
                    184: PF1 through PF10. By looking in the manual for your terminal, or by
                    185: using the
                    186: .I od(1)
                    187: utility, you've determined that F1 generates the sequence ESC?a, F2
                    188: generates ESC?b, F3 generates ESC?c, etc. So, using the above table,
                    189: you make entries in
                    190: .I /etc/termcap
                    191: for the key sequences as follows:
                    192: .IP
                    193: :P1=\\E?a:P2=\\E?b:P3=\\E?c:P4=\\E?d:....
                    194: .LP
                    195: Still using the above table, you make the name entries as follows:
                    196: .IP
                    197: :Nb=F1:Nc=F2:Nd=F3:Ne=F4:....
                    198: .LP
                    199: When you call on 
                    200: .I em_help
                    201: to print a keyboard map, it'll tell you that PF1 is F1, PF2 is F2, etc.
                    202: .LP
                    203: To illustrate further, suppose that there are Zentec Zephyr
                    204: terminals at your installation,
                    205: and you have determined that you'll use function keys labeled F1 through F12 for
                    206: 3270 functions PF1 through PF12.
                    207: To use the keyboard map facility of the
                    208: .I em_help
                    209: module, you make entries in
                    210: .I /etc/termcap's
                    211: zephyr description as follows:
                    212: .LP
                    213: .DS
                    214: :Nb=F1:Nc=F2:Nd=F3:Ne=F4:Nf=F5:Ng=F6:Nh=F7:\\\\
                    215: :Nj=F8:Nk=F9:Nm=F10:Nn=F11:No=F12:
                    216: .DE
                    217: .LP
                    218: The following partial
                    219: .I /etc/termcap
                    220: entry for the Zentec Zephyr terminal should give you an idea as to how to
                    221: make key name entries:
                    222: .DS L
                    223: z1|zeph|zephyr|zentec zephyr:\\\\
                    224:        :N0=F16,r:N1=New Line:N2=Clear Page:N3=BACKTAB:N4=Line Delete:\\\\
                    225:        :N5=Line Clear:N6=INS:N7=DEL:N8=F13:N9=F14:Na=F15:\\\\
                    226:        :Nb=F1:Nc=F2:Nd=F3:Ne=F4:Nf=F5:Ng=F6:Nh=F7:Nj=F8:Nk=F9:Nm=F10:\\\\
                    227:        :Nn=F11:No=F12:Np=F16,!<cmd>:Ns=F16,s:Nt=F16,q:Nu=TAB:\\\\
                    228:        :Nq=Shift-F1:Nr=Shift-F2: ....
                    229: .DE
                    230: .LP
                    231: .bp
                    232: .LP
                    233: The
                    234: .I help
                    235: facility will produce the following keyboard map:
                    236: .TS
                    237: center,box;
                    238: c s s s
                    239: c s s s
                    240: c s s s
                    241: c c|c c
                    242: l l|l l.
                    243: Terminal: zentec zephyr
                    244: The keyboard map for your terminal is as follows:
                    245: 
                    246: 3270 Name      zentec zephyr Key       3270 Name       zentec zephyr Key
                    247: _
                    248: RESET  F16,r   PF7     F7
                    249: ENTER  New Line        PF8     F8
                    250: CLEAR  Clear Page      PF9     F9
                    251: BACKTAB        BACKTAB         PF10    F10
                    252: ERASE-EOF      Delete Line     PF11    F11
                    253: ERASE-INP      Clear Line      PF12    F12
                    254: INSERT INS     Shell cmd       F16,!<cmd>
                    255: DELETE DEL     FM      Shift-F1
                    256: PA1    F13     DUP     Shift-F2
                    257: PA2    F14     Stats   F16,s
                    258: PA3    F15     Exit    F16,q
                    259: PF1    F1      TAB     TAB
                    260: PF2    F2      
                    261: PF3    F3      Resetkey        No Assignment
                    262: PF4    F4      Help Key        No Assignment
                    263: PF5    F5      Stat Key        No Assignment
                    264: PF6    F6      Printkey        No Assignment
                    265: .TE
                    266: .SH
                    267: SEE ALSO:
                    268: .DS
                    269: TERMCAP(5)
                    270: od(1)
                    271: .DE

unix.superglobalmegacorp.com

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