|
|
1.1 root 1:
2:
3: termcap Technical Information termcap
4:
5:
6:
7:
8: Terminal description language
9:
10:
11: termcap is a language for describing terminals and their
12: capabilities. Terminal descriptions are collected in the file
13: /etc/termcap and are read by ttggeetteenntt and its related programs to
14: ensure that output to a particular terminal is in a format that
15: that terminal can understand.
16:
17: A terminal description written in tteerrmmccaapp consists of a series of
18: fields, which are separated from each other by colons `:'. Every
19: line in the description, with the exception of the last line,
20: must end in a backslash `\'. Tab characters are ignored. Lines
21: that begin with a `#' are comments. A tteerrmmccaapp description must
22: not exceed 1,024 characters.
23:
24: The first field names the terminal. Several different names may
25: be used, each separated by a vertical bar `|'; each name given,
26: however, must be unique within the file /eettcc/tteerrmmccaapp. By conven-
27: tion, the first listed must be two characters long. The second
28: name is the name by which the terminal is most commonly known;
29: this name may contain no blanks in it. Other versions of the
30: name may follow. By convention, the last version is the full
31: name of the terminal; here, spaces may be used for legibility.
32: Any of these may be used to name your terminal to the COHERENT
33: system. For example, the name field for the VT-100 terminal is
34: as follows:
35:
36:
37: d1|vt100|vt-100|pt100|pt-100|dec vt100:\
38:
39:
40: Note that the names are separated by vertical bars `|', that the
41: field ends with a colon, and that the line ends with a backslash.
42: Using any of these names in an eexxppoorrtt command will make the cor-
43: rect terminal description available to programs that need to use
44: it.
45:
46: The remaining fields in the entry describe the capabilities of
47: the terminal. Each capability field consists of a two-letter
48: code, and may include additional information. There are three
49: types of capability:
50:
51: _B_o_o_l_e_a_n
52: This indicates whether or not a terminal has a specific fea-
53: ture. If the field is present, the terminal is assumed to
54: have the feature; if it is absend, the terminal is assumed
55: not to have that feature. For example, the field
56:
57: aamm:
58:
59: is present, tteerrmmccaapp assumes that the terminal has automatic
60: margins, whereas if that field is not present, the program
61: using termcap assumes that the terminal does not have them.
62:
63:
64: COHERENT Lexicon Page 1
65:
66:
67:
68:
69: termcap Technical Information termcap
70:
71:
72:
73:
74: _N_u_m_e_r_i_c
75: This gives the size of some aspect of the terminal. Numeric
76: capability fields have the capability code, followed by a
77: `#' and a number. For example, the entry
78:
79: ccoo#8800:
80:
81: means that the terminal screen is 80 columns wide.
82:
83: _S_t_r_i_n_g _c_a_p_a_b_i_l_i_t_i_e_s
84: These give a sequence of characters that trigger a terminal
85: operation. These fields consist of the capability code, an
86: equal sign `=', and the string.
87:
88: Strings often include escape sequences. A ``\EE'' indicates
89: an <EESSCC> character; a control character is indicated with a
90: carat `^' plus the appropriate letter; and the sequences \bb,
91: \ff, \nn, \rr, and \tt are, respectively, backspace, formfeed,
92: newline, <rreettuurrnn>, and tab.
93:
94: An integer or an integer followed by an asterisk in the
95: string (e.g., `_i_n_t*') indicates that execution of the func-
96: tion should be delayed by _i_n_t milliseconds; this delay is
97: termed _p_a_d_d_i_n_g. Thus, deletion on lines on the Microterm
98: Mime-2A is coded as:
99:
100: dl=20*^W:
101:
102: ddll is the capability code for _d_e_l_e_t_e, the equal sign intro-
103: duces the deletion sequence, 2200* indicates that each line
104: deletion should be delayed by 20 milliseconds, and ^WW in-
105: dicates that the line-deletion code on the Mime-2A is <ccttrrll-
106: WW>.
107:
108: The asterisk indicates that the padding required is propor-
109: tional to the number of lines affected by the operation. In
110: the above example, the deletion of four lines on the Mime-2A
111: generates a total of 80 milliseconds of padding; if no as-
112: terisk were present, however, the padding would be only 20
113: milliseconds, no matter how many lines were deleted. Also,
114: when an asterisk is used, the number may be given to one
115: decimal place, to show tenths of a millisecond of padding.
116:
117: Note that with string capabilities, characters may be given
118: as a backslash followed by the three octal digits of the
119: character's ASCII code. Thus, a colon in a capability field
120: may be given by \007722. To put a null character into the
121: string, use \220000, because termcap strips the high bit from
122: each character.
123:
124: Finally, the literal characters `^' and `\' are given by
125: ``\^'' and ``\\''.
126:
127:
128:
129:
130: COHERENT Lexicon Page 2
131:
132:
133:
134:
135: termcap Technical Information termcap
136:
137:
138:
139: ***** Capability Codes *****
140:
141: The following table lists tteerrmmccaapp's capability codes. TTyyppee in-
142: dicates whether the code is boolean, numeric, or string; an am-
143: persand `&' indicates that this capability may include padding,
144: and an ampersand plus an asterisk ``&*'' indicates that it may be
145: used with the asterisk padding function described above.
146:
147: _N_a_m_e _T_y_p_e _D_e_f_i_n_i_t_i_o_n
148:
149: aaee string& End alternate set of characters
150: aall string&* Add blank line
151: aamm boolean Automatic margins
152: aass string& Start alternate set of characters
153: bbcc string Backspace character, if not ^HH
154: bbss boolean Backspace character is ^HH
155: bbtt string& Backtab
156: bbww boolean Backspace wraps from column 0
157: to last column
158: CCCC string Command character in prototype
159: if it can be set at terminal
160: ccdd string&* Clear to end of display
161: ccee string& Clear line
162: cchh string& Horizontal cursor motion
163: ccll string&* Clear screen
164: ccmm string& Cursor motion, both vertical and
165: horizontal
166: ccoo number& Number of columns
167: ccrr string&* <rreettuurrnn>; default ^MM
168: ccss string& Change scrolling region (DEC
169: VT100 only); resembles ccmm
170: ccvv string& Vertical cursor motion
171: ddaa boolean& Display above may be retained
172: ddBB number Milliseconds of delay needed by bbss
173: ddbb boolean Display below may be retained
174: ddCC number Milliseconds of delay needed by ccrr
175: ddcc string&* Delete a character
176: ddFF number Milliseconds of delay needed byffff
177: ddll string&* Delete a line
178: ddmm string Enter delete mode
179: ddNN number Milliseconds of delay needed by nnll
180: ddoo string Move down one line
181: ddTT number Milliseconds of delay needed by tab
182: eedd string Leave delete mode
183: eeii string Leave insert mode; use :eeii=:
184: if this string is the same as iicc
185: eeoo string Erase overstrikes with a blank
186: ffff string&* Eject hardcopy terminal page;
187: default ^LL
188: hhcc boolean Hardcopy terminal
189: hhdd string Move half-line down, i.e., forward
190: 1/2 line feed)
191: hhoo string Move cursor to home position; use
192: if ccmm is not set
193: hhuu string Move half-line up, i.e., reverse
194:
195:
196: COHERENT Lexicon Page 3
197:
198:
199:
200:
201: termcap Technical Information termcap
202:
203:
204:
205: 1/2 line feed
206: hhzz string Cannot print tilde `~' (Hazeltine
207: terminals only)
208: iicc string& Insert a character
209: iiff string Name of the file that contains iiss
210: iimm string Begin insert mode; use :iimm=:
211: if iicc has not been set
212: iinn boolean Nulls are distinguished in display
213: iipp string&* Insert padding after each
214: character listed
215: iiss string Initialize terminal
216: kk00-kk99 string Codes sent by function keys 0-9
217: kkbb string Code sent by backspace key
218: kkdd string Code sent by down-arrow key
219: kkee string Leave ``keypad transmit'' mode
220: kkhh string Code sent by home key
221: kkll string Code sent by left-arrow key
222: kknn number No. of function keys; default is 10
223: kkoo string Entries for for all other
224: non-function keys
225: kkrr string Code sent by right-arrow key
226: kkss string Begin ``keypad transmit'' mode
227: kkuu string Code sent by up-arrow key
228: ll00-ll99 string Function keys labels if not f0-f9
229: llii number Number of lines
230: llll string Move cursor to first column of
231: last line; use if ccmm is not set
232: mmii boolean Cursor may be safely moved while
233: in insert mode
234: mmll string Turn on memory lock for area of
235: screen above cursor
236: mmss boolean Cursor may be safely moved while
237: in standout or underline mode
238: mmuu string Turn off memory lock
239: nncc boolean <rreettuurrnn> does not work
240: nndd string Move cursor right non-destructively
241: nnll string&* Newline character; default is \nn. _O_b_s_o_l_e_t_e
242: nnss boolean Terminal is CRT, but does not scroll
243: ooss boolean Terminal can overstrike
244: ppcc string Pad character any character other than null
245: pptt boolean Terminal's tabs set by hardware;
246: may need to be set with iiss
247: ssee string Exit standout mode
248: ssff string& Scroll forward
249: ssgg number Blank characters left by ssoo or ssee
250: ssoo string Enter standout mode
251: ssrr string& Reverse scroll
252: ttaa string& Tab character other than ^II,
253: or used with character padding
254: ttcc string Similar terminal--must be
255: last field in entry
256: ttee string End a program that uses ccmm
257: ttii string Begin a program that uses ccmm
258: uucc string Underscore character and skip it
259: uuee string Leave underscore mode
260:
261:
262: COHERENT Lexicon Page 4
263:
264:
265:
266:
267: termcap Technical Information termcap
268:
269:
270:
271: uugg number Blank characters left by uuss or uuee
272: uull boolean Terminal underlines but does not overstrike
273: uupp string Move up one line
274: uuss string Begin underscore mode
275: vvbb string Visible bell; may not move cursor
276: vvee string Exit open/visual mode
277: vvss string Begin open/visual mode
278: xxbb boolean Beehive terminal (f1=<eesscc>,
279: f2=<ccrrttll-CC>)
280: xxnn boolean Newline is ignored after wrap
281: xxrr boolean <rreettuurrnn> behaves like ccee \rr \nn
282: xxss boolean Standout mode is not erased by writing over it
283: xxtt boolean Tabs are destructive
284:
285: The following is the tteerrmmccaapp description of the Zenith Z-19 ter-
286: minal. The meaning of each field will be described:
287:
288:
289: kb|h19|heath|h19b|heathkit|heath-19|z19|zenith|heathkit h19:\
290: :al=1*\EL:am:bs:cd=\EJ:ce=\EK:cl=\EE:cm=\EY%+ %+ :\
291: :co#80:dc=\EN:dl=1*\EM:do=\EB:ei=\EO:ho=\EH:\
292: :im=\E@:li#24:mi:nd=\EC:as=\EF:ae=\EG:ms:pt:\
293: :sr=\EI:se=\Eq:so=\Ep:up=\EA:vs=\Ex4:ve=\Ey4:\
294: :kb=^h:ku=\EA:kd=\EB:kl=\ED:kr=\EC:kh=\EH:kn#8:\
295: :k1=\ES:k2=\ET:k3=\EU:k4=\EV:k5=\EW:\
296: :l6=blue:l7=red:l8=white:k6=\EP:k7=\EQ:k8=\ER:
297:
298:
299: The first field, which occupies line 1, gives the various aliases
300: for this terminal. The Heathkit H-19, which appears most
301: prominently, was the home-kit version of the commercially sold Z-
302: 19. The remaining fields mean the following:
303:
304: :aall=11*\EELL: <eesscc>LL adds new blank line; use
305: one millisecond for each line added
306: :aamm: Terminal has automatic margins
307: :bbss: Backspace character is <ccttrrll>-HH (the default)
308: :ccdd=\EEJJ: <eesscc>JJ clears to end of display
309: :ccee=\EEKK: <eesscc>KK clears to end of line
310: :ccll=\EEEE: <eesscc>EE clears screen
311: :ccmm=\EEYY%+ %+ :Cursor motion (described later)
312: :ccoo#8800: Screen has 80 columns
313: :ddcc=\EENN:\ <eesscc>NN deletes a character
314: (backslash indicates end of a line)
315: :ddll=11*\EEMM: <eesscc>MM deletes a line
316: :ddoo=\EEBB: <eesscc>BB moves cursor down one line
317: :eeii=\EEOO: <eesscc>OO exits from insert mode
318: :hhoo=\EEHH: <eesscc>HH moves cursor to home position
319: :iimm=\EE@: <eesscc>@ begins insert mode (note that
320: iicc is set)
321: :llii#2244: Terminal has 24 lines
322: :mmii: Cursor may be moved safely while terminal
323: is in insert mode
324: :nndd=\EECC: <eesscc>CC moves cursor right non-destructively
325: :aass=\EEFF: <eesscc>FF begins set of alternate characters
326:
327:
328: COHERENT Lexicon Page 5
329:
330:
331:
332:
333: termcap Technical Information termcap
334:
335:
336:
337: :aaee=\EEGG:\ <eesscc>GG ends set of alternate characters
338: :mmss: Cursor may be moved safely while terminal
339: is in standout and underline mode
340: :pptt: Terminal has hardware tabs
341: :ssrr=\EEII: <eesscc>II reverse-scrolls the screen
342: :ssee=\EEqq: <eesscc>qq exits standout mode
343: :ssoo=\EEpp: <eesscc>pp begins standout mode
344: :uupp=\EEAA: <eesscc>AA moves the cursor up one line
345: :vvss=\EExx44: <eesscc>xx begins visual mode; insert
346: 4 milliseconds of padding
347: when visual mode is begun
348: :vvee=\EEyy44:\ <eesscc>yy ends visual mode; insert
349: 4 milliseconds of padding when visual
350: mode is ended
351: :kkbb=^hh: Backspace key sends <CCttrrll>-HH
352: :kkuu=\EEAA: Up-arrow key sends <eesscc>AA
353: :kkdd=\EEBB: Down-arrow key sends <eesscc>BB
354: :kkll=\EEDD: Left-arrow key sends <eesscc>DD
355: :kkrr=\EECC: Right-arrow key sends <eesscc>CC
356: :kkhh=\EEHH: Home key sends <eesscc>HH
357: :kknn#88:\ There are eight other keys on the
358: keyboard
359: :kk11=\EESS: Other key 1 sends <eesscc>SS
360: :kk22=\EETT: Other key 2 sends <eesscc>TT
361: :kk33=\EEUU: Other key 3 sends <eesscc>UU
362: :kk44=\EEVV: Other key 4 sends <eesscc>VV
363: :kk55=\EEWW:\ Other key 5 sends <eesscc>WW
364: :ll66=bblluuee: Other key 6 is labeled ``blue''
365: :ll77=rreedd: Other key 7 is labeled ``red''
366: :ll88=wwhhiittee: Other key 8 is labeled ``white''
367: :kk66=\EEPP: Other key 6 sends <eesscc>PP
368: :kk77=\EEQQ: Other key 7 sends <eesscc>QQ
369: :kk88=\EERR: Other key 8 sends <eesscc>RR
370:
371: Note that the last field did _n_o_t end with a backslash; this in-
372: dicated to the COHERENT system that the tteerrmmccaapp description was
373: finished.
374:
375: A terminal description does not have to be nearly so detailed.
376: If you wish to use a new terminal, first check the following
377: table to see if it already appears by tteerrmmccaapp. If it does not,
378: check the terminal's documentation to see if it mimics a terminal
379: that is already in /eettcc/tteerrmmccaapp, and use that description,
380: modifying it if necessary and changing the name to suit your ter-
381: minal. If you must create an entirely new description, first
382: prepare a skeleton file that contains the following basic
383: elements: number of lines, number of columns, backspace, cursor
384: motion, line delete, clear screen, move cursor to home position,
385: newline, move cursor up a line, and non-destructive right space.
386: For example, the following is the tteerrmmccaapp description for the
387: Lear-Siegler ADM-3A terminal:
388:
389:
390:
391:
392:
393:
394: COHERENT Lexicon Page 6
395:
396:
397:
398:
399: termcap Technical Information termcap
400:
401:
402:
403: la|adm3a|3a|lsi adm3a:\
404: :am:bs:cd=^W:ce=^X:cm=\E=%+ %+ :cl=^Z:co#80:ho=^^:li#24:\
405: :nd=^L:up=^K:
406:
407:
408: Once you have installed and debugged the skeleton description,
409: add details gradually until every feature of the terminal is
410: described.
411:
412: ***** Cursor Motion *****
413:
414: The cursor motion characteristic contains pprriinnttff-like escape se-
415: quences not used elsewhere. These encode the line and column
416: positions of the cursor, whereas other characters are passed un-
417: changed. If the ccmm string is considered as a function, then its
418: arguments are the line and the column to which the cursor is to
419: move; the % codes have the following meanings:
420:
421: %dd Decimal number, as in printf. The origin is 0.
422:
423: %22 Two-digit decimal number. The same as %22dd in printf.
424:
425: %33 Three-digit decimal number. The same as %33dd in printf.
426:
427: %. Single byte. The same as %cc in printf.
428:
429: %+_n Add n to the current position value. n may be either a num-
430: ber or a character.
431:
432: %>_n_m If the current position value is greater than _n+_m; then
433: there is no output.
434:
435: %rr Reverse order of line and column, giving column first and
436: then line. No output.
437:
438: %ii Increment line and column.
439:
440: %% Give a % sign in the string.
441:
442: %nn Exclusive or line and column with 0140 (Datamedia 2500 ter-
443: minal only).
444:
445: %BB Binary coded decimal (16 * (_n/10))+(_n%10). No output.
446:
447: %DD Reverse coding (_n-(22*(_n%1166)). No output (Delta Data ter-
448: minal only).
449:
450: To send the cursor to line 3, column 12 on the Hewlett-Packard
451: 2645, the terminal must be sent <eesscc>&aa1122cc0033YY padded for 6
452: milliseconds. Note that the column is given first and then the
453: line, and that the line and column are given as two digits each.
454: Thus, the cm capability for the Hewlett-Packard 2645 is given by:
455:
456:
457:
458:
459:
460: COHERENT Lexicon Page 7
461:
462:
463:
464:
465: termcap Technical Information termcap
466:
467:
468:
469: :cm=6\E&%r%2c%2Y:
470:
471:
472: The Microterm ACT-IV needs the current position sent preceded by
473: a <CCttrrll-TT>, with the line and column encoded in binary:
474:
475:
476: :cm=^T%.%.:
477:
478:
479: Terminals that use %. must be able to backspace the cursor (bbss or
480: bbcc) and to move the cursor up one line on the screen (uupp). This
481: is because transmitting \tt, \nn, \rr, or <ccttrrll-DD> may have undesir-
482: able consequences or be ignored by the system.
483:
484: ***** Similar Terminals *****
485:
486: If your system uses two similar terminals, one can be defined as
487: resembling the other, with certain exceptions. The code tc names
488: the similar terminal. This field must be last in the tteerrmmccaapp
489: entry, and the combined length of the two entries cannot exceed
490: 1,024 characters. Capabilities given first over-ride those in
491: the similar terminal, and capabilities in the similar terminal
492: can be cancelled by xxxx@ where xx is the capability. For example,
493: the entry
494:
495:
496: hn|2621nl|HP 2621nl:ks@:ke@:tc=2621
497:
498:
499: defines a Hewlett-Packard 2621 terminal that does not have the ks
500: and ke capabilities, and thus cannot turn on the function keys
501: when in visual mode.
502:
503: ***** Initialization *****
504:
505: A terminal initialization string may be given with the is
506: capability; if the string is too long, it may be read from a file
507: given by the if code. Usually, these strings set the tabs on a
508: terminal with settable tabs. If both is and if are given, is
509: will be printed first to clear the tabs, then the tabs will be
510: set from the file specified by if. The Hewlett-Packard 2626 has:
511:
512:
513: :is=\E&j@\r\E3\r:if=/usr/lib/tabset/stdcrt:
514:
515:
516: ***** Terminals Supported *****
517:
518: The following table lists the terminals described in
519: /eettcc/tteerrmmccaapp, and an abbreviated name for each.
520:
521: _N_a_m_e _T_e_r_m_i_n_a_l
522:
523: aacctt55 Microterm Act V
524:
525:
526: COHERENT Lexicon Page 8
527:
528:
529:
530:
531: termcap Technical Information termcap
532:
533:
534:
535: aaddmm33aa Lear-Siegler ADM3A
536: aaddmm3311 Lear-Siegler ADM31
537: aannssiippcc AT COHERENT console
538: ccoohhiibbmm PC COHERENT console
539: ddooss DOS 3.1 ANSI.SIS
540: hh11551100 Hazeltine 1510
541: hh1199 Heathkit H-19
542: hh1199aa Heathkit H-19 in ANSI
543: mmiimmee11 Microterm Mime1
544: mmiimmee22aa Microterm Mime2a
545: mmiimmee33aa Microterm Mime3a
546: qqvvtt110022 Qume QVT-102
547: qquummee55 Qume Sprint 5
548: ttvvii991122 Televideo 920
549: ttvvii992200 Televideo 920
550: ttvvii992255 Televideo 925
551: vvtt5522 DEC VT-52
552: vvtt110000 DEC VT-100
553: vvtt110000nn DEC VT-100 without initialization
554: vvtt110000ss DEC VT-100, 132 columns, 14 lines
555: vvtt110000ww DEC VT-100, 132 columns, 24 lines
556: wwyy5500 Wyse 50
557:
558: ***** Files *****
559:
560: /eettcc/tteerrmmccaapp
561:
562: ***** See Also *****
563:
564: modemcap, technical information, terminal-independent operations
565:
566:
567:
568:
569:
570:
571:
572:
573:
574:
575:
576:
577:
578:
579:
580:
581:
582:
583:
584:
585:
586:
587:
588:
589:
590:
591:
592: COHERENT Lexicon Page 9
593:
594:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.