Additional Cursor Movement

With the :cm=: field, the application can do most things with the cursor. It is, however, often more efficient to use some of the short cuts provided by the terminal. The following fields should be defined when possible:

Field

Description

bs

Defines a "backspace" (ASCII code 8). This field is becoming obsolete.

bc=

Defines the backspace, if it is other than the standard ASCII code 8. Ex: :bc=^A: specifies control-A as the backspace. The Wyse 60 uses the standard backspace.

nd=

Causes the cursor to move one character to the right without overwriting anything ("nd" means non-destructive space"). The Wyse manual gives "CTRL L" as the sequence. In termcap it would be :nd=^L:

up=

Moves the cursor up one line (staying in the same column). The Wyse 60 uses "CTRL K" represented in termcap as :up=^K:

do=

Moves the cursor down one line (staying in the same column). On the Wyse 60 this is done with the linefeed character. Therefore, it would be :do=\n:

ho=

Moves the cursor to the upper-left corner of the display. If this field is not present, the application can always move the cursor to (0,0) using the :cm=: field. Frequently, the :ho=: field is defined as a :cm=: sequence hardcoded for line 0, column 0. The Wyse 60 manual describes a home sequence as "ESC {". In termcap it would be :\E{:

ag - boolean -

Enables the cursor to be safely moved in graphics mode using any of the cursor movement commands.

cw= - string -

Cursor movement string for the large screen mode.

Region Clearing

The following termcap fields provide additional screen clearing capabilities:

Field

Description

cd=

Clears the screen from the line containing the cursor to the end of the screen, leaving everything above the cursor intact. The Wyse 60 uses :cd=\EY:

ce=

Clears the current line from the cursor to the end of the line.The Wyse 60 uses :ce=\ET:

Text Insertion and Deletion

The following fields enable text insertions and deletions:

Field

Description

al=

Inserts a blank line. The line containing the cursor and all lines below it are pushed down. The cursor is left at the new blank line. The Wyse 60 uses :al=\EE:

dl=

Deletes the line containing the cursor. All lines below the cursor are moved up. The Wyse 60 uses :\ER:

db

Indicates that the terminal maintains display memory below the bottom line of the screen. In this case, a line delete operation might "pull up" old text below the bottom of the screen instead of the expected blank line.

im=

Places the terminal in "insert mode" to insert characters within a line on the screen. There are two methods of character insertions typically used by terminals. The first method is to have an insert mode that may be turned on and off. While in insert mode, any text printed to the display will be inserted instead of overwriting existing text. To insert a single character, the application must send the :im=: string, followed by the character to insert, followed by the sequence to turn off insert mode.

 

The second method is to have an escape sequence that inserts a single space at the cursor position. The application can then send the character to be inserted, which overwrites the space just inserted.

 

Many terminals support both methods. For historical reasons, the :im=: field should be given regardless of the insertion method chosen. If the second method is being used, the :im=: field should specify an empty string such as :im=:

ei=

Defines the sequence to turn off insert mode. The :ei=: field should always be present if the :im=: field is present.

ic=

Describes the sequence to insert a single space at the cursor position. If an insert mode is being used, this field is normally not given.

 

The Wyse 60 manual describes sequences to turn insert mode on and off as well as a sequence to insert a single space. The latter will be used for this termcap example, which is ESC Q. In termcap it will look like :im=:ei=:ic=\EQ:

dc=

"Delete character" field. It must provide the sequence that will delete a single character at the cursor position. The Wyse 60 uses ESC W. In termcap that would be expressed as :dc=\EW: