X3270/Keymap

Description
x3270 keymaps map keyboard and mouse events to actions.

The keymap name
The keymap resource defines the name of the keymap to use. It can be a single name, or a series of names. If there are conflicts, later keymaps override earlier ones.

If the keymap resource is not defined, the environment variables $KEYMAP and $KEYBD are checked, in that order, for the name.

Mode-specific keymaps
Each keymap can optionally be defined in three separate parts: a common keymap, which is applied at all times, an NVT-mode keymap, which is applied only in NVT mode, and a 3270-mode keymap, which is only applied in 3270 mode. The NVT-mode keymap has the same name as the common keymap, with the suffix .nvt appended. The 3270-mode keymap has the suffix .3270 appended. Thus specifying a keymap value of foo implies the use of three different keymaps (if found): foo, foo.nvt and foo.3270.

User keymaps
The string .user is then appended to the keymap name and three more keymaps are searched for: foo.user, foo.user.nvt and foo.user.3270, for a total of six.

The intent of this feature is that a system administrator could define a common keymap foo, and then individual users could define their own extensions to keymap foo in their own X11 resource databases.

Where definitions are found
The keymap definition for the keymap named foo is the resource keymap.foo.

Keymap resources are first searched for in keymap resource files, then in the regular X11 resource database. Keymap resource files live in the directory defined by the confDir resource. The keymap resource file for keymap foo would be named keymap.foo. These are ordinary X11 resource database files, e.g., the file keymap.foo would contain the definitions of keymap.foo and optionally, the definitions of keymap.foo.nvt and keymap.foo.3270.

Keymap format
x3270 keymaps are Xt translation tables.