Remapping keys for ZIETrans Web applications

In every ZIETrans Web application is a file named KBS.js which determines how the keycode values generated by the users keyboard are mapped to key signals sent to the host session. To remap the ZIETrans keyboard, you must edit the KBS.js file. To locate KBS.js, go to the Navigator view then look in the project_name/Web Content/Common directory. There are three values in KBS.js which determine the relationship between any key on the keyboard being pressed and what signal is then sent to the host. These three values are:

  1. The keycode value for the pressed key, represented as an integer variable in the KBS.js file. For example,
    var CODE_F2 = 113; 
    for the F2 key,
  2. The combination of the keycode value and the Alt, Ctrl, and Shift states of the keyboard, and
  3. The Host On-Demand mnemonic keyword sent for the keycode combination value and Alt, Ctrl, and Shift states. For example,
    [CODE_F2, 0, 0, 0, '[pf2]']
    sends the pf2 key signal to the host when the F2 key is pressed on the user's keyboard.

To change key mappings in your ZIETrans Web application, you can change or add combinations allowing new or existing keys to send the mnemonic keyword.

Be aware that you cannot remap the Ctrl, Alt, and Shift modifier keys. ZIETrans uses JavaScript, and JavaScript does not consider these keys to be keypresses, but rather modifiers.

To remap keys in ZIETrans Web applications, you only need to modify the keycode and defaultKeyMappings variables at the top of the KBS.js file.

Note: There are dependencies between the keys listed in the KBS.js file, the Keyboard Support state of the Project Settings, and the presence or absence of any key buttons listed on the screen. The rules governing these dependencies are listed below.
  1. Keyboard support can be set using project-level settings to specify whether it should support all mapped keys, regardless of what buttons or links are displayed. To modify these settings, go to the ZIETrans Projects view and double click the Project Settings of your ZIETrans project, select the Other tab and click Keyboard Support. For more information, see Keyboard support.
  2. By default, ZIETrans shows the application keypad but does not display the host keypad. In order for ZIETrans to display the host keypad, you need to go to the ZIETrans Projects view and double click the Project Settings of your ZIETrans project, select the Rendering tab and click Host Keypad. You will then have the option of enabling the check box to display the host keypad as well as selecting which keys to display.