Termcap Notation Conventions

The string fields of a termcap entry (those with "=") usually describe escape sequences. Because escape sequences frequently contain the ESCAPE character as well as several other control characters, a form of notation has been implemented to allow easy expression of those codes. For example, a backslash followed by an "E" ("\E") is understood to mean the ESCAPE character. The table below contains a list of recognized characters:

Notation

Character

\E

ESCAPE

\n

linefeed

\r

carriage return

\t

tab

\b

backspace

\f

formfeed

\\

backslash

Control characters may be specified by using the "^" followed by the character. For example, "^A" represents "control A". If the "^" itself is desired, it must be preceded with a backslash "\^".

In addition, a character code may be expressed in octal. A backslash followed by three digits will be treated as an octal code as follows:

\012

linefeed

\177

DELcharacter

If a colon must be used within a termcap sequence, it must be expressed in octal as "\072" to avoid confusion with a colon used as a field separator. If the null character (ASCII 0) is required, it must be expressed in octal as "\200".