summaryrefslogtreecommitdiff
path: root/info/termcap-3
blob: 5921c90e7205b1a2fe7a4edc1c73b85d9c648a71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
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
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
This is Info file ../info/termcap, produced by Makeinfo-1.49 from the
input file termcap.texi.

   This file documents the termcap library of the GNU system.

   Copyright (C) 1988 Free Software Foundation, Inc.

   Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.

   Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided that
the entire resulting derived work is distributed under the terms of a
permission notice identical to this one.

   Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that this permission notice may be stated in a
translation approved by the Foundation.


File: termcap,  Node: Standout,  Next: Underlining,  Prev: Insdel Char,  Up: Capabilities

Standout and Appearance Modes
=============================

   "Appearance modes" are modifications to the ways characters are
displayed.  Typical appearance modes include reverse video, dim, bright,
blinking, underlined, invisible, and alternate character set.  Each
kind of terminal supports various among these, or perhaps none.

   For each type of terminal, one appearance mode or combination of
them that looks good for highlighted text is chosen as the "standout
mode".  The capabilities `so' and `se' say how to enter and leave
standout mode.  Programs that use appearance modes only to highlight
some text generally use the standout mode so that they can work on as
many terminals as possible.  Use of specific appearance modes other
than "underlined" and "alternate character set" is rare.

   Terminals that implement appearance modes fall into two general
classes as to how they do it.

   In some terminals, the presence or absence of any appearance mode is
recorded separately for each character position.  In these terminals,
each graphic character written is given the appearance modes current at
the time it is written, and keeps those modes until it is erased or
overwritten. There are special commands to turn the appearance modes on
or off for characters to be written in the future.

   In other terminals, the change of appearance modes is represented by
a marker that belongs to a certain screen position but affects all
following screen positions until the next marker.  These markers are
traditionally called "magic cookies".

   The same capabilities (`so', `se', `mb' and so on) for turning
appearance modes on and off are used for both magic-cookie terminals
and per-character terminals.  On magic cookie terminals, these give the
commands to write the magic cookies.  On per-character terminals, they
change the current modes that affect future output and erasure.  Some
simple applications can use these commands without knowing whether or
not they work by means of cookies.

   However, a program that maintains and updates a display needs to know
whether the terminal uses magic cookies, and exactly what their effect
is. This information comes from the `sg' capability.

   The `sg' capability is a numeric capability whose presence indicates
that the terminal uses magic cookies for appearance modes.  Its value is
the number of character positions that a magic cookie occupies.  Usually
the cookie occupies one or more character positions on the screen, and
these character positions are displayed as blank, but in some terminals
the cookie has zero width.

   The `sg' capability describes both the magic cookie to turn standout
on and the cookie to turn it off.  This makes the assumption that both
kinds of cookie have the same width on the screen.  If that is not true,
the narrower cookie must be "widened" with spaces until it has the same
width as the other.

   On some magic cookie terminals, each line always starts with normal
display; in other words, the scope of a magic cookie never extends over
more than one line.  But on other terminals, one magic cookie affects
all the lines below it unless explicitly canceled.  Termcap does not
define any way to distinguish these two ways magic cookies can work. 
To be safe, it is best to put a cookie at the beginning of each line.

   On some per-character terminals, standout mode or other appearance
modes may be canceled by moving the cursor.  On others, moving the
cursor has no effect on the state of the appearance modes.  The latter
class of terminals are given the flag capability `ms' ("can move in
standout").  All programs that might have occasion to move the cursor
while appearance modes are turned on must check for this flag; if it is
not present, they should reset appearance modes to normal before doing
cursor motion.

   A program that has turned on only standout mode should use `se' to
reset the standout mode to normal.  A program that has turned on only
alternate character set mode should use `ae' to return it to normal. If
it is possible that any other appearance modes are turned on, use the
`me' capability to return them to normal.

   Note that the commands to turn on one appearance mode, including `so'
and `mb' ... `mr', if used while some other appearance modes are turned
on, may combine the two modes on some terminals but may turn off the
mode previously enabled on other terminals.  This is because some
terminals do not have a command to set or clear one appearance mode
without changing the others.  Programs should not attempt to use
appearance modes in combination except with `sa', and when switching
from one single mode to another should always turn off the previously
enabled mode and then turn on the new desired mode.

   On some old terminals, the `so' and `se' commands may be the same
command, which has the effect of turning standout on if it is off, or
off it is on.  It is therefore risky for a program to output extra `se'
commands for good measure.  Fortunately, all these terminals are
obsolete.

   Programs that update displays in which standout-text may be replaced
with non-standout text must check for the `xs' flag.  In a per-character
terminal, this flag says that the only way to remove standout once
written is to clear that portion of the line with the `ce' string or
something even more powerful (*note Clearing::.); just writing new
characters at those screen positions will not change the modes in
effect there.  In a magic cookie terminal, `xs' says that the only way
to remove a cookie is to clear a portion of the line that includes the
cookie; writing a different cookie at the same position does not work.

   Such programs must also check for the `xt' flag, which means that the
terminal is a Teleray 1061.  On this terminal it is impossible to
position the cursor at the front of a magic cookie, so the only two
ways to remove a cookie are (1) to delete the line it is on or (2) to
position the cursor at least one character before it (possibly on a
previous line) and output the `se' string, which on these terminals
finds and removes the next `so' magic cookie on the screen.  (It may
also be possible to remove a cookie which is not at the beginning of a
line by clearing that line.)  The `xt' capability also has implications
for the use of tab characters, but in that regard it is obsolete (*Note
Cursor Motion::).

`so'
     String of commands to enter standout mode.

`se'
     String of commands to leave standout mode.

`sg'
     Numeric capability, the width on the screen of the magic cookie. 
     This capability is absent in terminals that record appearance modes
     character by character.

`ms'
     Flag whose presence means that it is safe to move the cursor while
     the appearance modes are not in the normal state.  If this flag is
     absent, programs should always reset the appearance modes to
     normal before moving the cursor.

`xs'
     Flag whose presence means that the only way to reset appearance
     modes already on the screen is to clear to end of line.  On a
     per-character terminal, you must clear the area where the modes
     are set.  On a magic cookie terminal, you must clear an area
     containing the cookie. See the discussion above.

`xt'
     Flag whose presence means that the cursor cannot be positioned
     right in front of a magic cookie, and that `se' is a command to
     delete the next magic cookie following the cursor.  See discussion
     above.

`mb'
     String of commands to enter blinking mode.

`md'
     String of commands to enter double-bright mode.

`mh'
     String of commands to enter half-bright mode.

`mk'
     String of commands to enter invisible mode.

`mp'
     String of commands to enter protected mode.

`mr'
     String of commands to enter reverse-video mode.

`me'
     String of commands to turn off all appearance modes, including
     standout mode and underline mode.  On some terminals it also turns
     off alternate character set mode; on others, it may not.  This
     capability must be present if any of `mb' ... `mr' is present.

`as'
     String of commands to turn on alternate character set mode.  This
     mode assigns some or all graphic characters an alternate picture
     on the screen.  There is no standard as to what the alternate
     pictures look like.

`ae'
     String of commands to turn off alternate character set mode.

`sa'
     String of commands to turn on an arbitrary combination of
     appearance modes.  It accepts 9 parameters, each of which controls
     a particular kind of appearance mode.  A parameter should be 1 to
     turn its appearance mode on, or zero to turn that mode off.  Most
     terminals do not support the `sa' capability, even among those
     that do have various appearance modes.

     The nine parameters are, in order, STANDOUT, UNDERLINE, REVERSE,
     BLINK, HALF-BRIGHT, DOUBLE-BRIGHT, BLANK, PROTECT, ALT CHAR SET.


File: termcap,  Node: Underlining,  Next: Cursor Visibility,  Prev: Standout,  Up: Capabilities

Underlining
===========

   Underlining on most terminals is a kind of appearance mode, much like
standout mode.  Therefore, it may be implemented using magic cookies or
as a flag in the terminal whose current state affects each character
that is output.  *Note Standout::, for a full explanation.

   The `ug' capability is a numeric capability whose presence indicates
that the terminal uses magic cookies for underlining.  Its value is the
number of character positions that a magic cookie for underlining
occupies; it is used for underlining just as `sg' is used for standout.
 Aside from the simplest applications, it is impossible to use
underlining correctly without paying attention to the value of `ug'.

`us'
     String of commands to turn on underline mode or to output a magic
     cookie to start underlining.

`ue'
     String of commands to turn off underline mode or to output a magic
     cookie to stop underlining.

`ug'
     Width of magic cookie that represents a change of underline mode;
     or missing, if the terminal does not use a magic cookie for this.

`ms'
     Flag whose presence means that it is safe to move the cursor while
     the appearance modes are not in the normal state.  Underlining is
     an appearance mode.  If this flag is absent, programs should
     always turn off underlining before moving the cursor.

   There are two other, older ways of doing underlining: there can be a
command to underline a single character, or the output of `_', the
ASCII underscore character, as an overstrike could cause a character to
be underlined.  New programs need not bother to handle these
capabilities unless the author cares strongly about the obscure
terminals which support them.  However, terminal descriptions should
provide these capabilities when appropriate.

`uc'
     String of commands to underline the character under the cursor, and
     move the cursor right.

`ul'
     Flag whose presence means that the terminal can underline by
     overstriking an underscore character (`_'); some terminals can do
     this even though they do not support overstriking in general.  An
     implication of this flag is that when outputting new text to
     overwrite old text, underscore characters must be treated
     specially lest they underline the old text instead.


File: termcap,  Node: Cursor Visibility,  Next: Bell,  Prev: Underlining,  Up: Capabilities

Cursor Visibility
=================

   Some terminals have the ability to make the cursor invisible, or to
enhance it.  Enhancing the cursor is often done by programs that plan
to use the cursor to indicate to the user a position of interest that
may be anywhere on the screen--for example, the Emacs editor enhances
the cursor on entry. Such programs should always restore the cursor to
normal on exit.

`vs'
     String of commands to enhance the cursor.

`vi'
     String of commands to make the cursor invisible.

`ve'
     String of commands to return the cursor to normal.

   If you define either `vs' or `vi', you must also define `ve'.


File: termcap,  Node: Bell,  Next: Keypad,  Prev: Cursor Visibility,  Up: Capabilities

Bell
====

   Here we describe commands to make the terminal ask for the user to
pay attention to it.

`bl'
     String of commands to cause the terminal to make an audible sound.
      If this capability is absent, the terminal has no way to make a
     suitable sound.

`vb'
     String of commands to cause the screen to flash to attract
     attention ("visible bell").  If this capability is absent, the
     terminal has no way to do such a thing.


File: termcap,  Node: Keypad,  Next: Meta Key,  Prev: Bell,  Up: Capabilities

Keypad and Function Keys
========================

   Many terminals have arrow and function keys that transmit specific
character sequences to the computer.  Since the precise sequences used
depend on the terminal, termcap defines capabilities used to say what
the sequences are.  Unlike most termcap string-valued capabilities,
these are not strings of commands to be sent to the terminal, rather
strings that are received from the terminal.

   Programs that expect to use keypad keys should check, initially, for
a `ks' capability and send it, to make the keypad actually transmit.
Such programs should also send the `ke' string when exiting.

`ks'
     String of commands to make the function keys transmit.  If this
     capability is not provided, but the others in this section are,
     programs may assume that the function keys always transmit.

`ke'
     String of commands to make the function keys work locally.  This
     capability is provided only if `ks' is.

`kl'
     String of input characters sent by typing the left-arrow key.  If
     this capability is missing, you cannot expect the terminal to have
     a left-arrow key that transmits anything to the computer.

`kr'
     String of input characters sent by typing the right-arrow key.

`ku'
     String of input characters sent by typing the up-arrow key.

`kd'
     String of input characters sent by typing the down-arrow key.

`kh'
     String of input characters sent by typing the "home-position" key.

`K1' ... `K5'
     Strings of input characters sent by the five other keys in a 3-by-3
     array that includes the arrow keys, if the keyboard has such a
     3-by-3 array.  Note that one of these keys may be the
     "home-position" key, in which case one of these capabilities will
     have the same value as the `kh' key.

`k0'
     String of input characters sent by function key 10 (or 0, if the
     terminal has one labeled 0).

`k1' ... `k9'
     Strings of input characters sent by function keys 1 through 9,
     provided for those function keys that exist.

`kn'
     Number: the number of numbered function keys, if there are more
     than 10.

`l0' ... `l9'
     Strings which are the labels appearing on the keyboard on the keys
     described by the capabilities `k0' ... `l9'.  These capabilities
     should be left undefined if the labels are `f0' or `f10' and `f1'
     ... `f9'.

`kH'
     String of input characters sent by the "home down" key, if there is
     one.

`kb'
     String of input characters sent by the "backspace" key, if there is
     one.

`ka'
     String of input characters sent by the "clear all tabs" key, if
     there is one.

`kt'
     String of input characters sent by the "clear tab stop this column"
     key, if there is one.

`kC'
     String of input characters sent by the "clear screen" key, if
     there is one.

`kD'
     String of input characters sent by the "delete character" key, if
     there is one.

`kL'
     String of input characters sent by the "delete line" key, if there
     is one.

`kM'
     String of input characters sent by the "exit insert mode" key, if
     there is one.

`kE'
     String of input characters sent by the "clear to end of line" key,
     if there is one.

`kS'
     String of input characters sent by the "clear to end of screen"
     key, if there is one.

`kI'
     String of input characters sent by the "insert character" or "enter
     insert mode" key, if there is one.

`kA'
     String of input characters sent by the "insert line" key, if there
     is one.

`kN'
     String of input characters sent by the "next page" key, if there is
     one.

`kP'
     String of input characters sent by the "previous page" key, if
     there is one.

`kF'
     String of input characters sent by the "scroll forward" key, if
     there is one.

`kR'
     String of input characters sent by the "scroll reverse" key, if
     there is one.

`kT'
     String of input characters sent by the "set tab stop in this
     column" key, if there is one.

`ko'
     String listing the other function keys the terminal has.  This is a
     very obsolete way of describing the same information found in the
     `kH' ... `kT' keys.  The string contains a list of two-character
     termcap capability names, separated by commas.  The meaning is
     that for each capability name listed, the terminal has a key which
     sends the string which is the value of that capability.  For
     example, the value `:ko=cl,ll,sf,sr:' says that the terminal has
     four function keys which mean "clear screen", "home down", "scroll
     forward" and "scroll reverse".


File: termcap,  Node: Meta Key,  Next: Initialization,  Prev: Keypad,  Up: Capabilities

Meta Key
========

   A Meta key is a key on the keyboard that modifies each character you
type by controlling the 0200 bit.  This bit is on if and only if the
Meta key is held down when the character is typed.  Characters typed
using the Meta key are called Meta characters.  Emacs uses Meta
characters as editing commands.

`km'
     Flag whose presence means that the terminal has a Meta key.

`mm'
     String of commands to enable the functioning of the Meta key.

`mo'
     String of commands to disable the functioning of the Meta key.

   If the terminal has `km' but does not have `mm' and `mo', it means
that the Meta key always functions.  If it has `mm' and `mo', it means
that the Meta key can be turned on or off.  Send the `mm' string to
turn it on, and the `mo' string to turn it off. I do not know why one
would ever not want it to be on.


File: termcap,  Node: Initialization,  Next: Pad Specs,  Prev: Meta Key,  Up: Capabilities

Initialization
==============

`ti'
     String of commands to put the terminal into whatever special modes
     are needed or appropriate for programs that move the cursor
     nonsequentially around the screen.  Programs that use termcap to do
     full-screen display should output this string when they start up.

`te'
     String of commands to undo what is done by the `ti' string.
     Programs that output the `ti' string on entry should output this
     string when they exit.

`is'
     String of commands to initialize the terminal for each login
     session.

`if'
     String which is the name of a file containing the string of
     commands to initialize the terminal for each session of use. 
     Normally `is' and `if' are not both used.

`i1'
`i3'
     Two more strings of commands to initialize the terminal for each
     login session.  The `i1' string (if defined) is output before `is'
     or `if', and the `i3' string (if defined) is output after.

     The reason for having three separate initialization strings is to
     make it easier to define a group of related terminal types with
     slightly different initializations.  Define two or three of the
     strings in the basic type; then the other types can override one
     or two of the strings.

`rs'
     String of commands to reset the terminal from any strange mode it
     may be in.  Normally this includes the `is' string (or other
     commands with the same effects) and more.  What would go in the
     `rs' string but not in the `is' string are annoying or slow
     commands to bring the terminal back from strange modes that nobody
     would normally use.

`it'
     Numeric value, the initial spacing between hardware tab stop
     columns when the terminal is powered up.  Programs to initialize
     the terminal can use this to decide whether there is a need to set
     the tab stops. If the initial width is 8, well and good; if it is
     not 8, then the tab stops should be set; if they cannot be set,
     the kernel is told to convert tabs to spaces, and other programs
     will observe this and do likewise.

`ct'
     String of commands to clear all tab stops.

`st'
     String of commands to set tab stop at current cursor column on all
     lines.


File: termcap,  Node: Pad Specs,  Next: Status Line,  Prev: Initialization,  Up: Capabilities

Padding Capabilities
====================

   There are two terminal capabilities that exist just to explain the
proper way to obey the padding specifications in all the command string
capabilities.  One, `pc', must be obeyed by all termcap-using programs.

`pb'
     Numeric value, the lowest baud rate at which padding is actually
     needed.  Programs may check this and refrain from doing any
     padding at lower speeds.

`pc'
     String of commands for padding.  The first character of this
     string is to be used as the pad character, instead of using null
     characters for padding.  If `pc' is not provided, use null
     characters.  Every program that uses termcap must look up this
     capability and use it to set the variable `PC' that is used by
     `tputs'. *Note Padding::.

   Some termcap capabilities exist just to specify the amount of
padding that the kernel should give to cursor motion commands used in
ordinary sequential output.

`dC'
     Numeric value, the number of msec of padding needed for the
     carriage-return character.

`dN'
     Numeric value, the number of msec of padding needed for the newline
     (linefeed) character.

`dB'
     Numeric value, the number of msec of padding needed for the
     backspace character.

`dF'
     Numeric value, the number of msec of padding needed for the
     formfeed character.

`dT'
     Numeric value, the number of msec of padding needed for the tab
     character.

   In some systems, the kernel uses the above capabilities; in other
systems, the kernel uses the paddings specified in the string
capabilities `cr', `sf', `le', `ff' and `ta'.  Descriptions of
terminals which require such padding should contain the `dC' ... `dT'
capabilities and also specify the appropriate padding in the
corresponding string capabilities.  Since no modern terminals require
padding for ordinary sequential output, you probably won't need to do
either of these things.


File: termcap,  Node: Status Line,  Next: Half-Line,  Prev: Pad Specs,  Up: Capabilities

Status Line
===========

   A "status line" is a line on the terminal that is not used for
ordinary display output but instead used for a special message.  The
intended use is for a continuously updated description of what the
user's program is doing, and that is where the name "status line" comes
from, but in fact it could be used for anything.  The distinguishing
characteristic of a status line is that ordinary output to the terminal
does not affect it; it changes only if the special status line commands
of this section are used.

`hs'
     Flag whose presence means that the terminal has a status line.  If
     a terminal description specifies that there is a status line, it
     must provide the `ts' and `fs' capabilities.

`ts'
     String of commands to move the terminal cursor into the status
     line. Usually these commands must specifically record the old
     cursor position for the sake of the `fs' string.

`fs'
     String of commands to move the cursor back from the status line to
     its previous position (outside the status line).

`es'
     Flag whose presence means that other display commands work while
     writing the status line.  In other words, one can clear parts of
     it, insert or delete characters, move the cursor within it using
     `ch' if there is a `ch' capability, enter and leave standout mode,
     and so on.

`ds'
     String of commands to disable the display of the status line.  This
     may be absent, if there is no way to disable the status line
     display.

`ws'
     Numeric value, the width of the status line.  If this capability is
     absent in a terminal that has a status line, it means the status
     line is the same width as the other lines.

     Note that the value of `ws' is sometimes as small as 8.


File: termcap,  Node: Half-Line,  Next: Printer,  Prev: Status Line,  Up: Capabilities

Half-Line Motion
================

   Some terminals have commands for moving the cursor vertically by
half-lines, useful for outputting subscripts and superscripts.  Mostly
it is hardcopy terminals that have such features.

`hu'
     String of commands to move the cursor up half a line.  If the
     terminal is a display, it is your responsibility to avoid moving
     up past the top line; however, most likely the terminal that
     supports this is a hardcopy terminal and there is nothing to be
     concerned about.

`hd'
     String of commands to move the cursor down half a line.  If the
     terminal is a display, it is your responsibility to avoid moving
     down past the bottom line, etc.


File: termcap,  Node: Printer,  Prev: Half-Line,  Up: Capabilities

Controlling Printers Attached to Terminals
==========================================

   Some terminals have attached hardcopy printer ports.  They may be
able to copy the screen contents to the printer; they may also be able
to redirect output to the printer.  Termcap does not have anything to
tell the program whether the redirected output appears also on the
screen; it does on some terminals but not all.

`ps'
     String of commands to cause the contents of the screen to be
     printed. If it is absent, the screen contents cannot be printed.

`po'
     String of commands to redirect further output to the printer.

`pf'
     String of commands to terminate redirection of output to the
     printer. This capability must be present in the description if
     `po' is.

`pO'
     String of commands to redirect output to the printer for next N
     characters of output, regardless of what they are.  Redirection
     will end automatically after N characters of further output.  Until
     then, nothing that is output can end redirection, not even the
     `pf' string if there is one.  The number N should not be more than
     255.

     One use of this capability is to send non-text byte sequences
     (such as bit-maps) to the printer.

   Most terminals with printers do not support all of `ps', `po' and
`pO'; any one or two of them may be supported.  To make a program that
can send output to all kinds of printers, it is necessary to check for
all three of these capabilities, choose the most convenient of the ones
that are provided, and use it in its own appropriate fashion.


File: termcap,  Node: Summary,  Next: Var Index,  Prev: Capabilities,  Up: Top

Summary of Capability Names
***************************

   Here are all the terminal capability names in alphabetical order
with a brief description of each.  For cross references to their
definitions, see the index of capability names (*note Cap Index::.).

`ae'
     String to turn off alternate character set mode.

`al'
     String to insert a blank line before the cursor.

`AL'
     String to insert N blank lines before the cursor.

`am'
     Flag: output to last column wraps cursor to next line.

`as'
     String to turn on alternate character set mode.like.

`bc'
     Very obsolete alternative name for the `le' capability.

`bl'
     String to sound the bell.

`bs'
     Obsolete flag: ASCII backspace may be used for leftward motion.

`bt'
     String to move the cursor left to the previous hardware tab stop
     column.

`bw'
     Flag: `le' at left margin wraps to end of previous line.

`CC'
     String to change terminal's command character.

`cd'
     String to clear the line the cursor is on, and following lines.

`ce'
     String to clear from the cursor to the end of the line.

`ch'
     String to position the cursor at column C in the same line.

`cl'
     String to clear the entire screen and put cursor at upper left
     corner.

`cm'
     String to position the cursor at line L, column C.

`CM'
     String to position the cursor at line L, column C, relative to
     display memory.

`co'
     Number: width of the screen.

`cr'
     String to move cursor sideways to left margin.

`cs'
     String to set the scroll region.

`cS'
     Alternate form of string to set the scroll region.

`ct'
     String to clear all tab stops.

`cv'
     String to position the cursor at line L in the same column.

`da'
     Flag: data scrolled off top of screen may be scrolled back.

`db'
     Flag: data scrolled off bottom of screen may be scrolled back.

`dB'
     Obsolete number: msec of padding needed for the backspace
     character.

`dc'
     String to delete one character position at the cursor.

`dC'
     Obsolete number: msec of padding needed for the carriage-return
     character.

`DC'
     String to delete N characters starting at the cursor.

`dF'
     Obsolete number: msec of padding needed for the formfeed character.

`dl'
     String to delete the line the cursor is on.

`DL'
     String to delete N lines starting with the cursor's line.

`dm'
     String to enter delete mode.

`dN'
     Obsolete number: msec of padding needed for the newline character.

`do'
     String to move the cursor vertically down one line.

`DO'
     String to move cursor vertically down N lines.

`ds'
     String to disable the display of the status line.

`dT'
     Obsolete number: msec of padding needed for the tab character.

`ec'
     String of commands to clear N characters at cursor.

`ed'
     String to exit delete mode.

`ei'
     String to leave insert mode.

`eo'
     Flag: output of a space can erase an overstrike.

`es'
     Flag: other display commands work while writing the status line.

`ff'
     String to advance to the next page, for a hardcopy terminal.

`fs'
     String to move the cursor back from the status line to its
     previous position (outside the status line).

`gn'
     Flag: this terminal type is generic, not real.

`hc'
     Flag: hardcopy terminal.

`hd'
     String to move the cursor down half a line.

`ho'
     String to position cursor at upper left corner.

`hs'
     Flag: the terminal has a status line.

`hu'
     String to move the cursor up half a line.

`hz'
     Flag: terminal cannot accept `~' as output.

`i1'
     String to initialize the terminal for each login session.

`i3'
     String to initialize the terminal for each login session.

`ic'
     String to insert one character position at the cursor.

`IC'
     String to insert N character positions at the cursor.

`if'
     String naming a file of commands to initialize the terminal.

`im'
     String to enter insert mode.

`in'
     Flag: outputting a space is different from moving over empty
     positions.

`ip'
     String to output following an inserted character in insert mode.

`is'
     String to initialize the terminal for each login session.

`it'
     Number: initial spacing between hardware tab stop columns.

`k0'
     String of input sent by function key 0 or 10.

`k1 ... k9'
     Strings of input sent by function keys 1 through 9.

`K1 ... K5'
     Strings sent by the five other keys in 3-by-3 array with arrows.

`ka'
     String of input sent by the "clear all tabs" key.

`kA'
     String of input sent by the "insert line" key.

`kb'
     String of input sent by the "backspace" key.

`kC'
     String of input sent by the "clear screen" key.

`kd'
     String of input sent by typing the down-arrow key.

`kD'
     String of input sent by the "delete character" key.

`ke'
     String to make the function keys work locally.

`kE'
     String of input sent by the "clear to end of line" key.

`kF'
     String of input sent by the "scroll forward" key.

`kh'
     String of input sent by typing the "home-position" key.

`kH'
     String of input sent by the "home down" key.

`kI'
     String of input sent by the "insert character" or "enter insert
     mode" key.

`kl'
     String of input sent by typing the left-arrow key.

`kL'
     String of input sent by the "delete line" key.

`km'
     Flag: the terminal has a Meta key.

`kM'
     String of input sent by the "exit insert mode" key.

`kn'
     Numeric value, the number of numbered function keys.

`kN'
     String of input sent by the "next page" key.

`ko'
     Very obsolete string listing the terminal's named function keys.

`kP'
     String of input sent by the "previous page" key.

`kr'
     String of input sent by typing the right-arrow key.

`kR'
     String of input sent by the "scroll reverse" key.

`ks'
     String to make the function keys transmit.

`kS'
     String of input sent by the "clear to end of screen" key.

`kt'
     String of input sent by the "clear tab stop this column" key.

`kT'
     String of input sent by the "set tab stop in this column" key.

`ku'
     String of input sent by typing the up-arrow key.

`l0'
     String on keyboard labelling function key 0 or 10.

`l1 ... l9'
     Strings on keyboard labelling function keys 1 through 9.

`le'
     String to move the cursor left one column.

`LE'
     String to move cursor left N columns.

`li'
     Number: height of the screen.

`ll'
     String to position cursor at lower left corner.

`lm'
     Number: lines of display memory.

`mb'
     String to enter blinking mode.

`md'
     String to enter double-bright mode.

`me'
     String to turn off all appearance modes

`mh'
     String to enter half-bright mode.

`mi'
     Flag: cursor motion in insert mode is safe.

`mk'
     String to enter invisible mode.

`mm'
     String to enable the functioning of the Meta key.

`mo'
     String to disable the functioning of the Meta key.

`mp'
     String to enter protected mode.

`mr'
     String to enter reverse-video mode.

`ms'
     Flag: cursor motion in standout mode is safe.

`nc'
     Obsolete flag: do not use ASCII carriage-return on this terminal.

`nd'
     String to move the cursor right one column.

`nl'
     Obsolete alternative name for the `do' and `sf' capabilities.

`ns'
     Flag: the terminal does not normally scroll for sequential output.

`nw'
     String to move to start of next line, possibly clearing rest of
     old line.

`os'
     Flag: terminal can overstrike.

`pb'
     Number: the lowest baud rate at which padding is actually needed.

`pc'
     String containing character for padding.

`pf'
     String to terminate redirection of output to the printer.

`po'
     String to redirect further output to the printer.

`pO'
     String to redirect N characters ofoutput to the printer.

`ps'
     String to print the screen on the attached printer.

`rc'
     String to move to last saved cursor position.

`RI'
     String to move cursor right N columns.

`rp'
     String to output character C repeated N times.

`rs'
     String to reset the terminal from any strange modes.

`sa'
     String to turn on an arbitrary combination of appearance modes.

`sc'
     String to save the current cursor position.

`se'
     String to leave standout mode.

`sf'
     String to scroll the screen one line up.

`SF'
     String to scroll the screen N lines up.

`sg'
     Number: width of magic standout cookie.  Absent if magic cookies
     are not used.

`so'
     String to enter standout mode.

`sr'
     String to scroll the screen one line down.

`SR'
     String to scroll the screen N line down.

`st'
     String to set tab stop at current cursor column on all lines.
     programs.

`ta'
     String to move the cursor right to the next hardware tab stop
     column.

`te'
     String to return terminal to settings for sequential output.

`ti'
     String to initialize terminal for random cursor motion.

`ts'
     String to move the terminal cursor into the status line.

`uc'
     String to underline one character and move cursor right.

`ue'
     String to turn off underline mode

`ug'
     Number: width of underlining magic cookie.  Absent if underlining
     doesn't use magic cookies.

`ul'
     Flag: underline by overstriking with an underscore.

`up'
     String to move the cursor vertically up one line.

`UP'
     String to move cursor vertically up N lines.

`us'
     String to turn on underline mode

`vb'
     String to make the screen flash.

`ve'
     String to return the cursor to normal.

`vi'
     String to make the cursor invisible.

`vs'
     String to enhance the cursor.

`wi'
     String to set the terminal output screen window.

`ws'
     Number: the width of the status line.

`xb'
     Flag: superbee terminal.

`xn'
     Flag: cursor wraps in a strange way.

`xs'
     Flag: clearing a line is the only way to clear the appearance
     modes of positions in that line (or, only way to remove magic
     cookies on that line).

`xt'
     Flag: Teleray 1061; several strange characteristics.


File: termcap,  Node: Var Index,  Next: Cap Index,  Prev: Summary,  Up: Top

Variable and Function Index
***************************

* Menu:

* BC:                                   tgoto.
* ospeed:                               Output Padding.
* PC:                                   Output Padding.
* tgetent:                              Find.
* tgetflag:                             Interrogate.
* tgetnum:                              Interrogate.
* tgetstr:                              Interrogate.
* tgoto:                                tgoto.
* tparam:                               tparam.
* tputs:                                Output Padding.
* UP:                                   tgoto.


File: termcap,  Node: Cap Index,  Next: Index,  Prev: Var Index,  Up: Top

Capability Index
****************

* Menu:

* ae:                                   Standout.
* AL:                                   Insdel Line.
* al:                                   Insdel Line.
* am:                                   Wrapping.
* as:                                   Standout.
* bc:                                   Cursor Motion.
* bl:                                   Bell.
* bs:                                   Cursor Motion.
* bt:                                   Cursor Motion.
* bw:                                   Cursor Motion.
* CC:                                   Basic.
* cd:                                   Clearing.
* ce:                                   Clearing.
* ch:                                   Cursor Motion.
* cl:                                   Clearing.
* CM:                                   Cursor Motion.
* cm:                                   Cursor Motion.
* co:                                   Screen Size.
* cr:                                   Cursor Motion.
* cs:                                   Scrolling.
* cS:                                   Scrolling.
* ct:                                   Initialization.
* cv:                                   Cursor Motion.
* da:                                   Scrolling.
* dB:                                   Pad Specs.
* db:                                   Scrolling.
* dC:                                   Pad Specs.
* DC:                                   Insdel Char.
* dc:                                   Insdel Char.
* dF:                                   Pad Specs.
* dl:                                   Insdel Line.
* DL:                                   Insdel Line.
* dm:                                   Insdel Char.
* dN:                                   Pad Specs.
* DO:                                   Cursor Motion.
* do:                                   Cursor Motion.
* ds:                                   Status Line.
* dT:                                   Pad Specs.
* ec:                                   Clearing.
* ed:                                   Insdel Char.
* ei:                                   Insdel Char.
* eo:                                   Basic.
* es:                                   Status Line.
* ff:                                   Cursor Motion.
* fs:                                   Status Line.
* gn:                                   Basic.
* hc:                                   Basic.
* hd:                                   Half-Line.
* ho:                                   Cursor Motion.
* hs:                                   Status Line.
* hu:                                   Half-Line.
* hz:                                   Basic.
* i1:                                   Initialization.
* i3:                                   Initialization.
* IC:                                   Insdel Char.
* ic:                                   Insdel Char.
* if:                                   Initialization.
* im:                                   Insdel Char.
* in:                                   Insdel Char.
* ip:                                   Insdel Char.
* is:                                   Initialization.
* it:                                   Initialization.
* K1...K5:                              Keypad.
* k1...k9:                              Keypad.
* kA...kT:                              Keypad.
* ka...ku:                              Keypad.
* km:                                   Meta Key.
* l0...l9:                              Keypad.
* le:                                   Cursor Motion.
* LE:                                   Cursor Motion.
* li:                                   Screen Size.
* ll:                                   Cursor Motion.
* lm:                                   Scrolling.
* mb:                                   Standout.
* md:                                   Standout.
* me:                                   Standout.
* mh:                                   Standout.
* mi:                                   Insdel Char.
* mk:                                   Standout.
* mm:                                   Meta Key.
* mo:                                   Meta Key.
* mp:                                   Standout.
* mr:                                   Standout.
* ms:                                   Standout.
* ms:                                   Underlining.
* nc:                                   Cursor Motion.
* nd:                                   Cursor Motion.
* nl:                                   Cursor Motion.
* ns:                                   Scrolling.
* nw:                                   Cursor Motion.
* os:                                   Basic.
* pb:                                   Pad Specs.
* pc:                                   Pad Specs.
* pf:                                   Printer.
* po:                                   Printer.
* pO:                                   Printer.
* ps:                                   Printer.
* rc:                                   Cursor Motion.
* RI:                                   Cursor Motion.
* rp:                                   Basic.
* rs:                                   Initialization.
* sa:                                   Standout.
* sc:                                   Cursor Motion.
* se:                                   Standout.
* sf:                                   Scrolling.
* SF:                                   Scrolling.
* sg:                                   Standout.
* so:                                   Standout.
* SR:                                   Scrolling.
* sr:                                   Scrolling.
* st:                                   Initialization.
* ta:                                   Cursor Motion.
* te:                                   Initialization.
* ti:                                   Initialization.
* ts:                                   Status Line.
* uc:                                   Underlining.
* ue:                                   Underlining.
* ug:                                   Underlining.
* ul:                                   Underlining.
* up:                                   Cursor Motion.
* UP:                                   Cursor Motion.
* us:                                   Underlining.
* vb:                                   Bell.
* ve:                                   Cursor Visibility.
* vi:                                   Cursor Visibility.
* vs:                                   Cursor Visibility.
* wi:                                   Windows.
* ws:                                   Status Line.
* xb:                                   Basic.
* xn:                                   Wrapping.
* xs:                                   Standout.
* xt:                                   Cursor Motion.
* xt:                                   Standout.


File: termcap,  Node: Index,  Prev: Cap Index,  Up: Top

Concept Index
*************

* Menu:

* %:                                    Encode Parameters.
* appearance modes:                     Standout.
* bell:                                 Bell.
* clearing the screen:                  Clearing.
* command character:                    Basic.
* cursor motion:                        Cursor Motion.
* delete character:                     Insdel Char.
* delete line:                          Insdel Line.
* delete mode:                          Insdel Char.
* description format:                   Format.
* erasing:                              Clearing.
* generic terminal type:                Basic.
* home position:                        Cursor Motion.
* inheritance:                          Inheriting.
* initialization:                       Initialization.
* insert character:                     Insdel Char.
* insert line:                          Insdel Line.
* insert mode:                          Insdel Char.
* line speed:                           Output Padding.
* magic cookie:                         Standout.
* meta key:                             Meta Key.
* names of terminal types:              Naming.
* overstrike:                           Basic.
* padding:                              Pad Specs.
* padding:                              Padding.
* parameters:                           Parameters.
* printer:                              Printer.
* repeat output:                        Basic.
* reset:                                Initialization.
* screen size:                          Screen Size.
* screen size:                          Naming.
* screen size:                          Screen Size.
* scrolling:                            Scrolling.
* standout:                             Standout.
* status line:                          Status Line.
* Superbee:                             Basic.
* tab stops:                            Initialization.
* termcap:                              Introduction.
* terminal flags (kernel):              Initialize.
* underlining:                          Underlining.
* visibility:                           Cursor Visibility.
* visible bell:                         Bell.
* window:                               Windows.
* wrapping:                             Wrapping.
* wrapping:                             Naming.