StarQuest Technical Documents

Creating a Keyboard Map File for Client Access for UNIX (Character Oriented Terminals)

Last Update: September 3, 1998
Product: StarQuest Client Access for UNIX
Operating System: AIX, Solaris, HP-UX, SCO
Article ID: SQV00CA009

Abstract

Client Access for UNIX OS comes with a default keyboard map file. When executing the ca5250 emulator for the first time, the keyboard map file called ca5250_keymap is created in the .ca400 directory of the users $HOME directory. This document will explain how to change the default 5250 emulator keymap file.

Solution

Each key when pressed generates a code on a UNIX system. The codes generated by each key will be dependent on the type of terminal, as well as the terminal as defined in your terminfo database.

To view the output from a given key, you can simply press the key. For example, pressing the F3 key may return the code ^[c.

Follow these steps to map the F3 key.

  1. Store the output from the key into a file:

    $ cat > fkey3

^[c -(pressing the F3 key)

'Type Ctrl-D to exit cat'

  1. Get the hexadecimal code for the key:

    $ od -x fkey3

    000000 1b63 0a00

    000003

    Note: 1b63 is the key value here.

  2. cat or vi /usr/pub/ascii to find the values for the key

    -the values at the bottom are hexadecimal

    1b=esc (in keyboard file, this is denoted by '\E')

    63=c

  3. make a backup of the file $HOME/.ca400/ca5250_keymap
  4. vi $HOME/.ca400/ca5250_keymap
  5. In the '# Definitions for ANSI terminals.' Section, edit the line:

    Escape + '3':F3

    to read

    "\Ec":F3

  6. Save your changes

Notes:

Some key combinations may not work even after mapped. You may need to create a different combination for a common function.

If a key produces a hexadecimal pair less than 20, other than the escape sequences listed in the ca5250_keymap header(\E, \r, \n, \t, \b), try using the hexadecimal equivalent. In a case such as this, the mapping for the hexadecimal pairs 01 4a would read:

0x01+0x4a

Make sure that you do not create a duplicate definition for a key combination.

Make sure that you do not override a built-in function for ca5250. One such function is to bring up the menu bar at the top of the emulator. To do this, you press Escape + 'm'. An attempt to map Escape + 'm' to a 5250 function will result in unpredictable behavior.

 


DISCLAIMER

The information in technical documents comes without any warranty or applicability for a specific purpose. The author(s) or distributor(s) will not accept responsibility for any damage incurred directly or indirectly through use of the information contained in these documents. The instructions may need to be modified to be appropriate for the hardware and software that has been installed and configured within a particular organization.  The information in technical documents should be considered only as an example and may include information from various sources, including IBM, Microsoft, and other organizations.