ZIMTCAP Defining the Terminal Characteristics

ZIMTCAP Defining the Terminal Characteristics

Welcome to our Knowledge Base

Documentation | Blog | Demos | Support

< All Topics
Print

ZIMTCAP Defining the Terminal Characteristics

To prepare a terminal set-up that defines exactly how to produce certain Zim keyboard actions from your terminal keyboard, you must define specific keyboard information.  This information includes specific terminal usage for your specific operating system(s).

Operating System-Specific Aspects of Terminal Definition

Windows

To run Zim under Windows no terminal keyboard definitions are required.

UNIX

Under UNIX, the zimtcap files are located in the directory identified by Zim’s environment variable.  Zim and zimtcap obtain the value for termname in termname.ztcap from the current value of the TERM environment variable. If no value has been specified for TERM, or the file termname.ztcap cannot be found, you cannot execute ZIM.

If you choose zimtcap option 2 (Create a new terminal description) zimtcap creates a new zimtcap file. If you current terminal is defined in terminfo or termcap, zimtcap extracts the available information and places it into the new zimtcap file.  

Executing zimtcap

Under UNIX, Zim determines the characteristics of a terminal by consulting terminal description files, called zimtcap files. Each zimtcap file is stored under the name

termname.ztcap

where the value for termname (terminal name) and the location of the file is operating system-specific.

Each zimtcap file defines the characteristics of its termname to ZIM by indicating the terminal keys that perform specific functions (for example, Home, F1) and by indicating how certain terminal attributes are set.

The zimtcap utility program is provided with the ZIM software and is used to create or edit zimtcap files.

Note: The zimtcap program must be executed at the same type terminal for which you are creating the zimtcap file.

When running zimtcap, your are presented with a menu that includes seven options:

  • Display Current Description
  • Create a New Terminal Description
  • Edit Terminal Attributes
  • Edit Cursor Positioning
  • Edit Output Definitions
  • Edit Input Definitions
  • Exit
  • These options are described below.

    Display Current Description

    This zimtcap option enables you to open the current zimtcap file and display the file contents on your terminal screen.

    Note: A zimtcap file for your terminal must exist before you can select this option. To create a default zimtcap file for your terminal refer to option 2 (Create a New Terminal Description) below.

    Create a New Terminal Description

    This zimtcap option enables you to create a new zimtcap file for your terminal. This file contains the default values for your terminal.

    Edit Terminal Attributes

    This zimtcap option enables you to edit the terminal attributes, such as number of screen rows or columns, contained in the current file.

    Note: A zimtcap file for your terminal must exist before you can select this option. To create a default zimtcap file for your termina,l refer to option 2 (Create a New Terminal Description).

    Edit Cursor Positioning

    This zimtcap option enables you to change the definition of how cursor positioning is handled by your terminal.

    Note: A zimtcap file for your terminal must exist for before you can use this option. To create a default zimtcap file for your termina,l refer to option 2 (Create a New Terminal Description).

    To set the cursor position, the zimtcap program sends a string with the following format,

    L1 p1 SEP p2 LO

    where L1 is the Lead In sequence of characters;

    LO is the Lead Out sequence;

    and SEP either is not present or is a sequence of characters separating the cursor coordinates p1 and p2..

    On some terminals, the row is sent first (i.e. p1 is the row) and on others, the column is sent first (i.e. p1 is the first column). On some terminals, positions are sent as single characters and on others, they are sent as one or two digit numbers in character form. In either case, the actual row and column value can be offset by some value.

    ZIMTCAP prompts you for these attributes.

    Note: When entering offsets for rows and columns, remember that the top left-hand corner of the screen is considered to be row 1, column 1.

    Edit Output Definitions

    This zimtcap option enables you to define the character sequences that must be sent to the terminal in order to turn certain attributes, such as inverse video, on and off.

    Note: A zimtcap file for your terminal must exist before you can select this option. To create a default zimtcap file for your terminal, refer to option 2 (Create a New Terminal Description).

    Edit Output Definitions

    This zimtcap option enables you to change the assignment of terminal keys to various Zim actions (for example PageUp and F1 action).

    Note: A zimtcap file for your terminal must exist before you can select this option. To create a default zimtcap file for your terminal, refer to option 2 (Create a New Terminal Description).

    When zimtcap prompts you for the name of each action, type the key (or sequence of keys) that require to represent that action within Zim. Terminate each definition by pressing Return. To keep the current definition for any action, press Return without typing any key (or sequence of keys).

    Exit

    This option enables you to exit from zimtcap. All changes made are saved.

    Terminal Key Definitions for Zim Actions

    The following table defines the terminal key mappings to Zim actions.

    Terminal Key

    Zim Action

    Terminal Key

    Zim Action

    F17

    Home

    F7

    F2

    F18

    PageUp

    F8

    F3

    F19

    PageDown

    F9

    F4

    F20

    End

    F10

    F5

    Remove

    RubOut

    F11

    F6

    Insert

    Insert

    F12

    F7

    Tab

    TabForward

    F13

    F8

    Esc Esc*

    Escape

    F15

    F10

    F6

    F1

    F15

    F10

    * It is common for special terminal keys to generate character sequences that begin with the escape character.  In these cases, it is common to implement the Zim action Escape as a sequence of two escape keystrokes in order to distinguish it from the others.

     

    Was this article helpful?
    0 out of 5 stars
    5 Stars 0%
    4 Stars 0%
    3 Stars 0%
    2 Stars 0%
    1 Stars 0%
    5
    How can we improve this article?
    Please submit the reason for your vote so that we can improve the article.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    en_CAEnglish