Information Center

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. The numberic keys 0-9 and * and # can be remapped.

This remainder of this help file contains the following subsections:

Key assignment
Assigning keys to functions
Assigning keys to custom functions
Assigning keys to applets
Assigning keys to macros
Duplicate key assignments
Unassigning keys
Searching for key assignments
Restoring key assignments
Restrictions on key remapping
APL keyboard support

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, Popup Keypad 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, Popup Keypad, 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 the 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.
  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. Note: If you select a macro in a User Library, then Host On-Demand searches all user library locations for the selected macro name at the time you run the macro. See Searching user-defined macro locations for more information.

Duplicate key assignments

This feature only applies to Host On-Demand clients running with a Java Plug-in of 1.4.0 or newer (or Java Plug-in 1.4.2 or newer on Macintosh clients).  Refer Restrictions on key remapping for additional restrictions.

Duplicate keys on a keyboard can be assigned to independent functions.  Duplicate keys include keys like Shift or Ctrl that occur in multiple places on the keyboard.  To assign unique mappings for duplicate keys, follow the steps for Assigning keys to functions

Key mappings assigned in Host On-Demand version 8.0 are migrated with duplicate key support to Host On-Demand version 9.0 where the duplicate keys have the same mapping as their main key counterparts.  

This support does not affect keys used as modifiers.  If you use Ctrl, Alt, Shift or Meta in combination with another key, then no key location is processed with regard to the modifier.  For example, for the key combination Shift+Enter, the location of the Shift key is disregarded.  Therefore, the right or left Shift keys both act in the same manner for this combination, since the Shift key is defined as the modifier.


Administrators can use the Deployment Wizard to directly modify properties of sessions that have been defined for HTML model pages.  If the administrator uses the Deployment Wizard to modify keyboard properties, then the following should be noted:
  • Keyboard mappings that are defined with Deployment Wizard utilize duplicate key support. Therefore, keys like Ctrl that occur in multiple places on the keyboard can be mapped to independent keys and functions. 
  • When sessions with these mappings are loaded in a client with a Java Runtime Environment (JRE) of version 1.4 or newer*, then all of the independent mappings will be retained. 
  • When these sessions are loaded in a client with a JRE older than version 1.4, the independent mappings cannot be processed.   Instead, the keys from the numpad or the left Shift/Ctrl/Alt/Meta keys will share the same mapping as their counterpart keys from the main location of the keyboard or the right Shift/Ctrl/Alt/Meta keys, respectively.

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 on key remapping

Please note the following restrictions on key remapping:

  1. When using Java 2 with Host On-Demand, the Ctrl-Tab and the Ctrl-Shift-Tab key combinations cannot be remapped. With Java 2, these key combinations are consumed by the Java Focus Manager and are not returned to Host On-Demand for processing.

  2. Certain key combinations are treated in a similar fashion and cannot be assigned to different keyboard functions.

  3. Duplicate key support only applies to Host On-Demand clients running with a Java Plug-in of 1.4.0 or newer. Macintosh clients require a JRE of version 1.4.2 or newer for duplicate key support.  If the JRE is older than version 1.4.2, it does not recognize the locations of keys on the keyboard.

  4. For JREs older than version 1.4, 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 JRE makes no distinction between the following: 

  5. Duplicate key support does not affect keys used as modifiers.  If you use Ctrl, Alt, Shift or Meta in combination with another key, then no key location is processed with regard to the modifier.  A Host On-Demand user or administrator cannot assign different key remapping functions to the following: 

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

  7. If you reassign a duplicate key that is a left Shift/Ctrl/Alt/Meta key or a numpad key, and you bring up Host On-Demand in a previous Java release (or Host On-Demand version 8.0 or earlier), you will receive an Unknown key code message.  

  8. Some duplicate keys do not appear on all keyboards, however, Java is not capable of testing to see if a particular key exists.  Therefore, the key remapping facility might have default assignments for keys that do not exist on your keyboard.  You can delete these key remaps, but you will not be able to reassign them.

  9. When you are mapping keys as an administrator, keep in mind that some clients might not have the same keyboard layout that you do (for example, the user may lack the Meta Key or Command key on Macintosh). Plan your mappings accordingly, otherwise clients might not be able to use some of the default mappings.

  10. With Sun Java 2 Version 1.4.2_03 and IBM Java 2 Version 1.4.1, Host On-Demand displays "Unknown key code" as part of the key name for the following key combinations: This is a limitation of Sun Java 2 Version 1.4.2_03 and IBM Java 2 Version 1.4.1.

APL keyboard support

By default, Host On-Demand now provides APL keyboard support. Prior to this, APL keyboard support was provided by running customized applet in Host On-demand. In this case, you need to write the applet that contains your mapping for APL keys. With this new enhancement, you no longer need to do this. The APL support in Host On-demand is similar to what is provided with IBM Personal Communications. APL keyboard can be enabled or disabled by pressing Ctrl+F8. APL support is meant only for 3270 sessions.

3278 APL Extended Character Code support

Host On-Demand supports 3278 APL Extended Character Code along with 3270 APL Characters for 3270 Display sessions.

Configuration: The ExtendedAPL applet that has the mappings for 3278 APL Extended Character Set can be added to the session at startup. You can perform the following tasks:

  1. Start the Deployment Wizard and select Create/edit the HTML. In the Properties window for any session to be used with APL, add the following in the Start Options tab:
    1. Set the Auto-Start pull-down to Applet.
    2. Type com.ibm.eNetwork.HOD.applet.ExtendedAPL in the Auto-Start Name field.
  2. Save the HTML file.
  3. On the client system, click the saved new or modified HTML file to access.
  4. You can enable or disable APL by pressing the Ctrl+F11 keys.

To run this applet after the session has been started,you can select Actions > Run applet from the session menu and type com.ibm.eNetwork.HOD.applet.ExtendedAPL as the name of the applet.

To run this applet in WCT, you need to add the hodappln2.jar (or hodappl2.jar if the problem determination is enabled) user as the User Jar file when creating the plugin.

Note: The addition of 3278 APL Extended Character Code does not affect the existing 3270 APL functions, which can be enabled using the Ctrl+F8 key combination.

This support is available only for the Type 3 APL keyboard layout. (It is not available for codepages in BIDI, Thai, and Hindi.)

Follow the steps below to configure the Regional and Language settings of the system:

When the ExtendedAPL applet is running, the Ctrl+F11 key combination is always used to enable and disable Extended APL mode, and any action assigned to this combination in keyremap will be ignored.

Related topics:

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