tc - Termcap editor
tc [ termcap ]
Tc is used to create or edit terminal capability (termcap) files. It uses a full-screen editor to make editing easy. The editing screen consists of four parts: the termcap code grid, the command menu, the mode line, and the function list.
The termcap code grid holds the raw emulation codes (shown in hexadecimal). Use the cursor keys to move around the grid. The cursor keys are Control-H for left, Control-U for right, Control-K for up, and Control-J for down. You can also use the inverted T-pattern of the 1, 3, 5, and 2 keys on a numeric keypad.
The mode line, below the grid, is the status display. It shows various settings and other information. Sections in the mode line are:
Y = ANSI-style emulation sequences.
N = non-ANSI emulation sequences.
Y = VT52-style screen clear sequence.
N = Normal screen clear sequence.
ASCII code (in decimal) of the lead-in prefix.
Terminal’s home row in decimal.
Order of coordinates sent with the GotoXY function, plus the offset added to each coordinate sent.
Current position in the grid, shown in hex, decimal, and the corresponding character on ASCII chart.
This flag represents character suppression for the ASCII character
that corresponds to the current grid position.
Y = the character is never displayed on the local console.
N = the character can be sent to the local console.
This flag determines if the lead-in prefix is required for the emulation
code at the current grid position.
Y = lead-in prefix required.
N = lead-in prefix not required.
The function list consists of the following:
Unused = no function GotoXY = move cursor to X,Y coordinates ClrScrn = clear the entire screen ClrEOS = clear from cursor to end of screen ClrEOL = clear from cursor to end of line InsLine = insert a line DelLine = delete a line InsChar = insert a character DelChar = delete a character Home = move cursor to the home position Beep = beeps CR = move cursor to start of line Inverse = turn on inverse mode Normal = turn off inverse mode ScrllUp = scroll screen up ScrllDn = scroll screen down Up = move cursor up Down = move cursor down Right = move cursor right Left = move cursor left SoftTab = move cursor to next tab stop HardTab = print spaces to next tab stop EraseLn = erase entire line InsOn = turn on insert mode InsOff = turn off insert mode UndLnOn = turn on underline mode UnLnOff = turn off underline mode MsTxtOn = turn on MouseText mode MsTxOff = turn off MouseText mode
Tc recognizes the following single-character commands:
New — switch to a new termcap or create one from scratch. You’re asked to enter the name of the termcap file. If you enter only a filename (no "/" characters), tc assumes that the termcap resides in $/sys/termcaps. Otherwise, tc uses the explicit pathname given.
Write — save the termcap file. You can use the default pathname, or enter a new one.
Quit — exit tc.
Function — assign a function to the code at the current grid position. The function list entries hilite as the cursor keys are used to move around the list. When the desired function name is selected, press RETURN.
Prefix — toggle the lead-in prefix requirement for the code at the current grid position.
Suppress — toggle the local console character suppression flag for the ASCII character represented by the current grid position.
Find Character — move to the location in the grid that represents the ASCII value of the character entered.
Find Decimal — move to the location in the grid based on the decimal value entered.
Find Hex — move to the location in the grid based on the hex value entered.
ANSI — toggle ANSI emulation sequences. When toggled on, emulation sequences follow the ANSI standard (ESC followed by [ and a command letter, plus any arguments). This mode is used for ANSI-BBS and VT100 emulation. Terminals such as VT52 and Televideo 912 do not use ANSI sequences.
Cursor Offset — set the offset added to X and Y coordinates when used in GotoXY sequences. Many terminals add 32 to X and Y coordinates.
Home Row — set the home row. The home row for most terminals is at the top of the display. A few terminals use the bottom line.
Lead-in Prefix — set the ASCII code of the lead-in prefix, usually 27. Some non-ANSI terminals do not use a prefix for commands; they simply use control codes.
VT52-Style Screen Clear — toggles VT52 screen clearing mode. When on, a ClrScrn sequence becomes two separate sequences: GotoXY to the top left corner of the screen, followed by ClrEOS. Most terminals require only a single sequence to clear the display.
XY Order — toggles XY or YX order for GotoXY coordinates.
The arrow keys or numeric keypad keys, as presented earlier, are used for navigation in the termcap code grid and the function list. Pressing Control-L redraws the entire display.