loading

This article contains instructions for configuring keyboard mapping and creating customized mapped key functions in TTWin.

What is Keyboard Mapping?

Keyboard mapping describes the process of linking the keys on your physical device keyboard with keys on the emulation keyboard.

Physical keys are the keys on the keyboard attached to your PC.

Emulation keys are the keys found on the terminal being emulated. As an example, emulation keys include keys such as the GOLD PF1 key on a VT220 terminal. By creating a keyboard mapping in TTWin you can decide which physical device key will send a GOLD PF1 keypress to your host system.

You create mappings for physical keys in three ways, with:

  • An emulation key from the current emulation, e.g., the VT220 PF1 key.
  • A global escape sequence, string or macro, e.g., ^[[1M - the ANSI sequence for bold text.
  • An emulation specific escape sequence, string or macro.

How to Map a Key

To create keyboard mapping in TTWin follow these steps:

  1. Select Keyboard... from the Configure menu. The Configure Keyboard tile is displayed.
  2. The Configure Keyboard tile displays two keyboards, as shown below. The upper keyboard is the physical keyboard for your PC and the lower keyboard is the emulation keyboard. The specific emulation keyboard displayed will depend on the emulation selected in the session configuration.
The Configure Keyboard tile
The Configure Keyboard tile.
  1. In the top half of the tile, select the physical key that you wish to map.
  2. To map to an emulation key: In the bottom half of the tile, click on the emulation key you want to assign to the selected physical key.
Select the keys you wish to map.
Select the physical and emulation key you wish to map.
  1. To map to a string: To assign an ASCII data string, an escape sequence or a macro to the physical key select String or Global string and enter the string or macro in the String field.
  1. Repeat step 4 or 5 for all the physical keys you wish to map.
  2. To save session settings and global mappings, you must also save the .TWC configuration file. To do this select Save configuration (default.twc) or Save configuration as... from the File menu.
Example

To map the ANSI BOLD escape sequence (ESC[1M) to CTRL + F6 for the current emulation, follow these steps:

  1. Click on the CTRL key and the F6 key on the PC keyboard (top of the tile).
  2. Select String.
  3. In the String field enter the text: \x1b[1m where \x1b represents the hex value for ESCAPE character.
  4. Click the Map button.
Assign an ASCII data string, an escape sequence or a macro to a physical key.
Assign an ASCII data string, an escape sequence or a macro to a physical key.

 NOTE

Hex values are prefixed by \x

Removing a Mapping

Click on the Remove button to remove a mapping. Alternatively, re-map both the physical key(s) and the emulation key(s).


Related Articles: