InfoCenter

Remapping the keyboard

Keyboard remapping lets you associate a sequence of keystrokes with a particular action, so that typing the sequence of keystrokes causes the action to occur. The sequence of keystrokes can be either a single key or a single key combined with Shift, Ctrl, or Alt. The action can be to display a character, to execute a host function, to execute a custom function, or to execute a menu command.

To access the Keyboard window, either click the Remap button on the toolbar, click Edit > Preferences > Keyboard, or click Keyboard in the session properties.

Key assignment
Assigning keys to functions
Assigning keys to custom functions
Assigning keys to applets
Assigning keys to macros
Unassigning keys
Searching for key assignments
Restoring key assignments
Restrictions for key remapping

Key Assignment

Open
You can open a new definition for a configuration component, such as keyboard or toolbar, from two different locations:

The current keyboard definition in your session is selected by default. In order to open a keyboard or toolbar definition file, it must have been previously saved to a drive (shared or local) to which you have access. For more information, refer to Opening Keyboard and Toolbar configuration components.

Category
Select the category of function you want to work with, for example, Characters, Host Functions, Custom Functions, and Menu Commands.

When you select a category, the specific functions within that category appear in the table below, along with the keys assigned to those functions. Select a function in this table to change its key assignment. Refer to Default Characters and Functions for more information.

Note that if the administrator has disabled Edit Keyboard Mappings, the only available button on this screen will be Search for Key.
Assign a Key
After selecting a function, click this button to assign a key to it.
Unassign Key
After selecting a function, click this button to undo its key assignment.
Custom Functions
Click this button to bring up the Custom Function Editor. Certain keyboard functions are predefined with Host On-Demand for remapping. The Custom Function Editor allows you to define and maintain new keyboard functions, called custom functions, without having to edit HTML and Java script files. These new functions may be mapped to key combinations, much like the predefined keyboard functions. Using the Custom Function Editor, you can add or delete a custom function. You can then go to the Keyboard Remap dialog, choose Custom Functions from the Category list, and your defined custom functions will appear in the list available for remapping. You can also assign a toolbar button to a custom function from the Keystroke page of the Customize Toolbar dialog.
Reset Key
Click this button and then select a key to restore the key to its default assignment.
Reset All
Click this button to restore the default key assignments to all functions.
Search for Key
Click this button to find out if a certain key has already been assigned to a function. If there is a function already assigned to this key, that function will appear highlighted along with its assigned key.
Save and Save As
Click Save to save the keyboard definition to the location from which you opened it. Click Save As to save the keyboard definition to either the current session or a file on your local system. The current keyboard settings in your session are selected by default. For more information about the Save As option, refer to Saving Keyboard and Toolbar configuration components.

Assigning keys to functions

To assign or reassign a key to a function:

  1. Start from a host session window.
  2. Click Edit > Preference > Keyboard, or click the Remap button on the toolbar.
  3. Click the Key Assignment tab.
  4. Select a Category.
  5. Select the function you want to assign a key to.
  6. Click Assign a Key.
  7. On your keyboard, press the key you want to assign to this function.

    You can assign a key combination to a function using the Alt, Ctrl, and Shift keys (for example, Alt+F1 or Ctrl+Alt+Q). If your browser is a version of Netscape earlier than 6.x, you might experience problems attempting to assign a key combination to a function using the Alt key. If this happens, you should not use Alt in key combinations.

    If the key has already been assigned to a function, you will be shown the function that that key is assigned to and told to unassign the key first.

  8. After you have successfully assigned all the keys you want, click OK.

Assigning keys to custom functions

If you want to assign a key or key combination to a custom function that is not currently listed in Keyboard Remap under the Custom Functions category, you can define these functions using the Custom Function Editor. When you do this, the Custom Functions category will appear with your newly defined functions, which can then be assigned to any key. Complete the assignment by following the steps for Assigning keys to functions, choosing Custom Functions as the category.

You can optionally define a custom function in the HTML or Java script file used to start the sessions. See adding additional HTML parameters for more information.

Assigning keys to applets

To assign or reassign a key to an applet, you must first run the applet:

  1. Start from a host session window.
  2. Click Actions > Run Applet, or click the Run Applet button on the toolbar.
  3. Type the name of the applet you want to run, and click Run.

    The applet is now available for a key assignment.

  4. Complete the assignment by following the steps for Assigning keys to functions.

Assigning keys to macros

  1. Before you can assign a key combination to a macro, you must create a macro, either by clicking Actions > Record Macro or by importing a macro using the Macro Editor.
  2. Click on Edit > Preferences > Keyboard to access the Key Remapping facility.
  3. Use the pull-down menu to select the Macro category. (If the Macro category does not appear, cancel out of the Key Remapping facility and wait a few moments for the Key Remapping facility to be notified of the macro change.)
  4. Once you have selected the Macro category, your macro should appear in the list in the table, and you can assign a key combination to it by following the steps for Assigning keys to functions.

Unassigning keys

To undo an assignment of a key to a function, select the function, and then click Unassign Key.

Searching for key assignments

To find out if a key has already been assigned to a function:

  1. Click Search for Key.
  2. On your keyboard, press the key or key combination you are interested in.

If there is that key has already been assigned a function, that function will appear highlighted along with its assigned key. If no function is assigned to that key, a "Not Assigned" message will appear.

Restoring key assignments

To restore a previously reassigned key to its default assignment:

  1. Click Reset Key.
  2. Click the key you want to restore.

To restore all keys to their default assignments, click Reset All.

The Ctrl key is mapped to the Enter function by default for the 3270 and 5250 emulators. Because Java does not distinguish between left and right Ctrl keys, this change means that both Ctrl keys now act as Enter. You can still remap Ctrl or use it in combination with another key, and you can still remap the Enter function to any other key.

Restrictions for key remapping

Restrictions for key remapping include the following:

JVM key events, such as key pressed and key released, are dependent upon the operating system and keyboard layout of the machine where they are processed. The JVM makes no distinction between the following:

If the JVM receives a key function for Enter from either the main Enter key or the keypad Enter key, the key stroke will be processed as an Enter key event. To the JVM, the two key strokes are not distinct. Similar processing will occur for the Control and Alt key functions defined in the same manner.

Note that on some operating systems, these sets of keys are defined differently. On AIX, the right Control key is defined with the Execute key function, not the Control key function. In this case, the JVM will treat the key strokes from the right and left Control keys differently.

Because of these JVM limitations, Host On-Demand is also unable to distinguish between two keys defined in the manner stated previously. A Host On-Demand user or administrator cannot assign different key remapping functions to

if the JVM processes these keys as the same key event. For example, if Right Ctrl+P is processed the same as Left Ctrl+P by the JVM, then these key combinations cannot be assigned to different key remapping functions in Host On-Demand.


Related topics:

  • Specifying a key as repeating or non-repeating
  • Default characters and functions