Skip to content

Mapping the Keyboard

You can customize your keyboard to associate keystrokes with Design Tool commands or terminal keystrokes. This process is known as keyboard mapping.

A keystroke can be:

  • A single key, such as K, F1, or Num Lock
  • A combination of keys that you press at the same time, such as Ctrl+F2 or Alt+Shift+M

When you use more than one key in a keystroke, all keys preceding the final key must be modifier keys—Alt, Ctrl, or Shift. You can create keystrokes with a single modifier key (Ctrl+F7) or with multiple modifier keys (Shift+Ctrl+F7).

The command that you map to a keystroke can be:

  • A terminal key, such as Attention or PF1
  • A Design Tool command, such as .aboutDlg or .Connect
  • Any combination of the above—you can build the Command string to include multiple terminal keys, and commands.

Drag-and-Drop Keymap Options

The following are some shortcuts you can use in the Keyboard Setup dialog box:

  • Click a PC keystroke and then, holding down the left mouse button, drag it to the terminal keyboard. Already mapped keys become small cyan rectangles; unmapped keys become a rectangle, but they don't change color. When you move this rectangle over a key on the terminal keyboard, a black outline appears around this key (indicating correct positioning over the key). The rectangular mouse cursor either retains its form (indicating that you can map to this key) or turns into a red circle with a line through it (indicating that you cannot map to this key).

  • The same process works in reverse. Select a terminal keystroke, and then drag it to the PC keyboard.

  • To remove mapping from a key, click the key, and then drag it off the Keyboard Setup dialog box. When you drag the key off the edge of the dialog box, the image of the key turns into a trash can; you can then release the left mouse button and the mapping is cleared.

Changing the PC or Terminal Keyboard

The Keyboard Type dialog box lets you specify which PC and Terminal keyboard are shown in the Keyboard Setup dialog box. On the Settings menu, click Keyboard to open the Keyboard Setup dialog box, and then click Keyboards to open the Keyboard Type dialog box. The Keyboard Type dialog box contains two list boxes:

  • PC - Click the down arrow to see the available PC keyboards.
  • Terminal - Click the down arrow to see the available terminal keyboards.

Other options that affect keyboard mapping are available in the View Settings dialog box (available from the Settings menu).

Identifying a Keystroke

To identify a keystroke:

  1. Click any modifier keys (Alt, Ctrl, or Shift) that you want to use in the keystroke. This step is optional. You can create keystrokes with no modifier keys (such as F7), with a single modifier key (Ctrl+F7), or with multiple modifier keys (Shift+Ctrl+F7).

  2. Select a primary key.

This can be any key on the PC keyboard--except an unavailable key. Cyan keys are already mapped. To remap a key, click Remove, and then continue.

If your keyboard keys on your keyboard do not exactly match the PC keyboard keys shown in the Keyboard Setup dialog box, use your keyboard, instead of the mouse, to select a PC keystroke. That way, you'll be able to see how your keyboard keys correspond to the keys on the Design Tool's graphical PC keyboard. Select a key, click an empty spot anywhere under PC Keyboard, and use your keyboard to press the keys you want. Do not use your mouse to click any keys.


You cannot remap the Windows logo function keys.

Removing a Keystroke's Mapping

  1. Select the keystroke on the PC keyboard in the Keyboard Setup dialog box
  2. Click the Remove button.

The key's mapping is cleared (so that pressing the keystroke has no effect in the Design Tool).

Resetting a Keystroke's Mapping

To reset a keystroke to its default setting...

  1. Identify a PC keystroke in the Keyboard Setup dialog box.
  2. Click the Default button.

Don't confuse the Default button with the Defaults button (which deletes all keyboard customizations).

This procedure only works for PC keystrokes mapped to an action other than the default action for the keystroke.

Restoring the Default Keyboard Mapping

To restore the default keyboard mapping, click Defaults in the Keyboard Setup dialog box.

All keyboard customizations are removed. For information on the default keyboard mapping for VT and HP terminals, click a mapped cyan/teal PC key and note the corresponding Action in the lower half of the Keyboard Mapping dialog box.

Determining Keyboard Mapping

Shading, color, and key appearance are used in the Keyboard Setup dialog box to show how your keyboard is mapped. Cyan keys are mapped, by default, but their mappings can be changed.

Keys not appearing in cyan are not mapped. (Letter and number keys are not considered mapped because it is unlikely you would want to redefine the mappings for these keys.)

If you want to see how a key on the PC is mapped, click the key to select it; the key is selected. If this PC key is mapped to a terminal key, the corresponding key on the terminal keyboard, below, is also selected. For example, click the F1 key on the PC keyboard. It changes color, as does the F1 key (in 5250 sessions) or the PF1 key (in 3270 sessions) on the terminal keyboard. Click F1 on the PC keyboard again to clear the key.


Num Lock key status affects the mapping: If you click the Num Lock key while the Keyboard Setup dialog box is open, you must exit and return to the dialog box before that change is reflected in the displayed keyboard mapping.

Some keys are mapped to Design Tool commands. For example, click the Caps Lock key on the PC keyboard. The terminal keyboard is replaced by a set of fields.

Caps Lock is mapped to the Design Tool command .Toggle(rc_CapsLockState), which turns capital letters on or off.

Click Caps Lock again to clear it.

If you click a modifier key (Alt, Ctrl, or Shift) on the PC keyboard, the color pattern on the remaining keys changes. For example, try clicking Alt. The keys that turn cyan are mapped to Alt. For example, in 5250 sessions, the F1 and D keys become cyan when you click Alt. This means that Alt+F1 and Alt+D are mapped in the Design Tool's default keyboard mapping.

Keys that appear dimmed when you click Alt, Ctrl, or Shift are currently mapped (in combination with the selected modifier key) and cannot be changed. Typically, these are keystrokes that are defined by Windows. For example:

Keystroke Map to setting
Alt+F4 Close the current window (Windows standard)
Ctrl+Esc Display the Windows task list (Windows standard)

Linking a Keystroke to a Command

Once you have identified a PC keystroke and one or more commands to map it to, click the Map button.

Mapping a Keystroke

There are three things you need to do in the Keyboard Setup dialog box to map a keystroke:

  1. Identify the keystroke
  2. Identify one or more commands
  3. Link the keystroke to the commands

With the Design Tool's Keyboard Setup dialog box, you can identify either the keystroke or the action first, but the linking process must be the final step.

Keyboard settings can be saved to a settings file (.dtool) with other configuration information.