Keyboard Translation Tables

A keyboard translation table maps a sequence of input codes received from a keyboard or database to logical function codes and characters recognized by Uniface.

All input is mapped by a keyboard translation table before it is processed by a Uniface application. This allows Uniface to work with a wide variety of keyboards without knowing the details for each one.

Keyboard translation tables can also be used to convert character strings during database input or output, providing database translation capability for fields in form components. This allows you to tailor the actions of the keyboard to your specific applications and needs.

Keyboard translation tables typically include mapping definitions for:

  • Character mappings for special symbols, such as the euro symbol.
  • Default key combinations, such asGOLD and SUPER key combination
  • User key combinations, which are processed by ProcScript in the USER_KEY trigger
  • Macros (groups of keystrokes) used to define other mappings

Each keyboard translation table is identified by a name and a library, which allows each site, or even each user, to use a definition that differs from the standard.

When you define a keyboard translation table, you make mappings between keyboard or input codes and text that Uniface can recognize. For example, for a store instruction can be defined by the following line in the keyboard translation table:

^esc^S ^STORE

Search Order for Keyboard Mappings

Each keystroke is evaluated at a number of levels, from system level to the keyboard translation table. Once a keystroke is interpreted at one level, the process stops. Further levels are not considered. When Uniface encounters a keystroke, it tries to map it to one of the following levels:

  1. System keys—for example, Control+Alt+Del is recognized as a system key in Microsoft Windows.
  2. Menu accelerators—you can define logical names for menu option accelerators which can be mapped to a keystroke or keystroke combination in the initialization file for the GUI (for example, an .ini file for Microsoft Windows or .Xdefaults for Unix).
  3. Native GUI keystrokes recognized by the widget that currently has focus—for example, Alt+Backspace is recognized as ‘Undo’ in an edit box in Microsoft Windows.

    Note:  Navigation keys are recognized only by some widgets. For example, the combo box uses navigation keys to scroll through its options.

  4. Field-level access keys—for example, each selection in a radio group can be activated by a mnemonic letter which usually appears underlined.
  5. Form-level access keys—for example, a command button can have an access key defined.
  6. Menu access keys—menu options have associated mnemonic letters that serve as menu access keys.
  7. Keyboard translation table.

During multikey sequences (for example, SUPER key combinations or compose character entries), levels 3 through 6 are skipped.

Related Topics