Annotation of 43BSD/contrib/B/man/man5/bterminal.5, revision 1.1.1.1

1.1       root        1: .ds [ [\\s-2
                      2: .ds ] \\s+2]
                      3: .ds _ \\v'+0u'\(ru\\v'-0u'\|
                      4: .if t .ds .3 .4v
                      5: .if n .ds .3 1v
                      6: .if t .ds Es \\e\\h'-.3m'\"Backslash too wide on Harris
                      7: .if n .ds Es \\e
                      8: .TH BTERMINAL 5 local
                      9: .tr **
                     10: .SH NAME
                     11: bterminal \-
                     12: adapting the
                     13: .I B
                     14: system to your local terminals
                     15: .SH DESCRIPTION
                     16: The
                     17: .I B
                     18: system uses the termcap library to address the terminal,
                     19: and determines the codes sent by your terminal's function keys
                     20: from the termcap database.
                     21: To this end it uses the environment variables TERM and TERMCAP
                     22: to determine the type and capabilities of your terminal.
                     23: (See
                     24: .IR tset (1)
                     25: and
                     26: .IR termcap (5)
                     27: for the exact use of termcap.)
                     28: .LP
                     29: You can also redefine the binding of editing operations
                     30: in a
                     31: .I "key definitions file."
                     32: There are a number of places where this file can be found,
                     33: so that there can be different key bindings per terminal
                     34: and per user.
                     35: It is even possible to define an environment variable giving
                     36: this place.
                     37: .SH DEFAULT KEY BINDINGS
                     38: The following table gives the names of the editing operations,
                     39: and the default bindings.
                     40: .LP
                     41: .in +2c
                     42: .ta 3c 6c
                     43: .if n .ta 12n 32n
                     44: .nf
                     45: Name   Default bindings        Termcap bindings
                     46: .sp \*(.3
                     47: accept ^\|I (1)
                     48: return ^\|M
                     49: widen  "\*(Esew"       \fIk1\fP (2)
                     50: first  "\*(Esef"       \fIk2\fP
                     51: last   "\*(Esel"       \fIk3\fP
                     52: extend "\*(Esee"       \fIk4\fP
                     53: upline "\*(Eseu"       \fIk5\fP
                     54: previous       "\*(Esep"       \fIk6\fP
                     55: next   "\*(Esen"       \fIk7\fP
                     56: downline       "\*(Esed"       \fIk8\fP
                     57: up     "\*(EseU"       \fIku\fP
                     58: down   "\*(EseD"       \fIkd\fP
                     59: left   "\*(Ese,"       \fIkl\fP
                     60: right  "\*(Ese."       \fIkr\fP
                     61: goto   ^\|G
                     62: undo   ^\|H
                     63: redo   ^\|U
                     64: delete ^\|D
                     65: copy   ^\|C
                     66: record ^\|R
                     67: play   ^\|P
                     68: look   ^\|L
                     69: help   "\*(Ese?"
                     70: exit   ^\|X
                     71: .sp \*(.3
                     72: ignore (3)
                     73: term\*_init (4)                \fIks\fP
                     74: term\*_done (4)                \fIke\fP
                     75: .fi
                     76: .in -2c
                     77: .LP
                     78: Notes:
                     79: .IP (1)
                     80: \&^\|X means the Control-X character, \*(Ese means escape;
                     81: see below for an exact description of the format of key definitions.
                     82: .IP (2)
                     83: The termcap entries
                     84: .I "k1 ... k8"
                     85: describe the codes sent by the function keys,
                     86: and
                     87: .I "ku ... kd"
                     88: decribe the codes sent by the arrow keys.
                     89: .IP (3)
                     90: With the name \fIignore\fP you can declare input strings illegal; see below.
                     91: .IP (4)
                     92: The termcap entries \fIks\fP and \fIke\fP are sent to the terminal
                     93: at startup and upon exiting.
                     94: .LP
                     95: .ne 3
                     96: The third column of the table describes additional bindings
                     97: for some operations that are derived from termcap,
                     98: if the termcap entry for your terminal defines that capability.
                     99: If a termcap definition conflicts with some other default,
                    100: the definition derived from the termcap holds.
                    101: (For instance, on a Televideo the left arrow key sends ^\|H;
                    102: this means that the binding of
                    103: .I undo
                    104: to ^\|H (or \*[BACKSPACE\*]) is no longer valid.)
                    105: .SH KEY DEFINITIONS FILE
                    106: Each line in the key definitions file contains one definition or a comment.
                    107: A definition consists of the name of the editing operation
                    108: (see the table above), an equals sign
                    109: .RB ( = ),
                    110: and one or more
                    111: .I items.
                    112: Each
                    113: .I item
                    114: can be a string, a number, or a control-character.
                    115: The latter is written as `\|^\|' followed by a letter.
                    116: A number is an octal number if it starts with 0 (it should not
                    117: include 8 or 9, then), otherwise it is decimal;
                    118: it stands for the corresponding ASCII character.
                    119: Strings are delimited by single
                    120: .RB ( ' )
                    121: or double (\fB"\fP) quotes.
                    122: Inside strings, the following escape sequences are recognized:
                    123: .sp \*(.3
                    124: .in +0.5i
                    125: .ta 2c
                    126: .nf
                    127: \*(Esddd       (one to three octal digits) the ASCII character ddd
                    128: \*(Esb backspace, 010
                    129: \*(Ese escape, 033
                    130: \*(Esf formfeed, 014
                    131: \*(Esn linefeed, 012
                    132: \*(Esr carriage return, 015
                    133: \*(Est tab, 011
                    134: \*(Es\fIchar\fP        any other character (notably \e or ' or ")
                    135: .fi
                    136: .in -0.5i
                    137: .sp \*(.3
                    138: Finally, everything from a `#' character to the end of the line is
                    139: taken as a comment (except inside a string, of course).
                    140: .LP
                    141: Each definition implies that the concatenation of its items, when received
                    142: as input, will provoke the execution of the designated editing
                    143: operation.
                    144: A definition for the `operation'
                    145: .I ignore
                    146: means that this input string will be treated as an illegal operation
                    147: (the
                    148: .I B
                    149: system will try to ring the bell).
                    150: .LP
                    151: Definitions for the
                    152: .I term\*_init
                    153: and
                    154: .I term\*_done
                    155: operations define strings that will be sent
                    156: .I to
                    157: the terminal at initialization time, and on exiting, respectively.
                    158: These can be used to set programmable function keys, for instance.
                    159: .LP
                    160: Note that the definitions in the file only
                    161: .I add
                    162: to the already existing key bindings (see the defaults above).
                    163: When one definition is an initial subsequence of the other,
                    164: the last one given in the file holds.
                    165: It is probably counter-productive to have the first item of
                    166: a definition start with a printable character,
                    167: as this would make it impossible to enter that character.
                    168: .LP
                    169: Beware that you cannot use ^\|] as a key binding when your interrupt
                    170: character is not the default \*[DEL\*] key; see below.
                    171: .LP
                    172: Examples:
                    173: .LP
                    174: .in +0.5i
                    175: .ta 20n
                    176: .nf
                    177: widen = "\*(Esep\*(Esr"        # HP-2621 function key 1 is escape p return
                    178: accept = ^\|I  # tab
                    179: undo = ^\|A "O" ^\|M   # unshifted function key 11 on Televideo
                    180:        # used because left arrow overwrites ^\|H
                    181: ignore = 0177  # ignore DEL (a common noise character)
                    182: .fi
                    183: .in -0.5i
                    184: .LP
                    185: The first of the following four files found by the B system is used to
                    186: read key bindings from:
                    187: .LP
                    188: .in +0.5i
                    189: .nf
                    190: $HOME/.Bed\*_$TERM
                    191: B\*_LIB/.Bed\*_$TERM
                    192: $HOME/.Bed\*_def
                    193: B\*_LIB/.Bed\*_def
                    194: .fi
                    195: .in -0.5i
                    196: .LP
                    197: Here $HOME and $TERM are the values of the environment variables;
                    198: see sh(1) and tset(1).
                    199: B\*_LIB stands for a directory appointed by your system administrator
                    200: (normally /usr/new/lib/B) where various auxiliary files for the
                    201: .I B
                    202: system are kept.
                    203: This organization allows different key bindings per user and
                    204: per terminal.
                    205: .SH HELP FILE
                    206: The file B\*_LIB/Bed\*_help contains a screenful of help information,
                    207: describing the editing operations and the keys to which they are bound.
                    208: If you change the key bindings this information is not correct
                    209: anymore, and so you can define an environment variable BED\*_HELP,
                    210: that gives the pathname of the file to be printed
                    211: when the
                    212: .I help
                    213: operation is executed.
                    214: .SH INTERRUPT
                    215: To interrupt the execution of a
                    216: .I B
                    217: command you should normally use the \*[BREAK\*] key.
                    218: If your interrupt character is the \*[DEL\*] key, this will
                    219: also work.
                    220: However, if you have set your interrupt character
                    221: with
                    222: .IR stty (1)
                    223: to something other than \*[DEL\*],
                    224: the
                    225: .I B
                    226: system will in turn reset it to ^\|].
                    227: This is done to prevent a collision with a key that accesses one of the
                    228: .I B
                    229: editing operations, like ^\|C for copy.
                    230: It means that you cannot use ^\|] as a key binding in a description file
                    231: in this case.
                    232: .SH INVERSE VIDEO (standout mode)
                    233: If your terminal skips a position on the screen when switching
                    234: to or from inverse video, you are out of luck.
                    235: The
                    236: .I B
                    237: editor must be able to display part of a word in inverse video
                    238: and the rest normal, without surrounding spaces in between.
                    239: You can still use
                    240: .I B
                    241: (without the
                    242: .I B
                    243: editor) with the command
                    244: .BR "b -e" ;
                    245: see
                    246: .IR b (1).
                    247: .SH GOTO OPERATION
                    248: The Goto operation can only be used on terminals that can move
                    249: the cursor locally, eg. the arrow keys do not send any codes to
                    250: the host computer.
                    251: If your terminal can be
                    252: .I sensed
                    253: for the cursor position, then you can use the operation
                    254: to tell it you moved the cursor away.
                    255: You should ask your system administrator to add the non standard
                    256: capabilities \fIsp\fP and \fIcp\fP to the termcap entry for
                    257: your terminal.
                    258: The \fIsp\fP capability should define the string sent by the
                    259: .I B
                    260: system to the terminal to request the cursor position.
                    261: The \fIcp\fP capability must define the format of the cursor position string
                    262: as returned by the terminal;
                    263: most of the % escapes as defined in termcap(5) for cursor addressing
                    264: are recognized.
                    265: (For example,
                    266: .IP
                    267: cp=\*(EsE&a%r%3c%3Y^\|M:sp=\*(EsE`\*(Es021
                    268: .LP
                    269: are the entries for a HP2621 terminal.)
                    270: .SH FILES
                    271: .ta 25n
                    272: .if n .ta 18n
                    273: .nf
                    274: B\*_LIB        /usr/new/lib/B, unless changed by your system administrator
                    275: $HOME/.Bed\*_$TERM     key definitions file; first of these four holds
                    276: B\*_LIB/.Bed\*_$TERM
                    277: $HOME/.Bed\*_def
                    278: B\*_LIB/.Bed\*_def
                    279: $BED\*_HELP    file with one screenful of help info
                    280: B\*_LIB/Bed\*_help     default help file
                    281: .fi
                    282: .SH BUGS
                    283: In searching for the key definitions file .Bed\*_$TERM
                    284: the
                    285: .I B
                    286: system doesn't recognize aliases for terminal types.
                    287: Watch out for variations like e.g. TERM=2621-wl.

unix.superglobalmegacorp.com

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