Technical article 111506

The <Alt> key no longer works with certain non-US keyboards.

OpenServer 5.0.6

Written · Last revised

Problem

After installing or upgrading to SCO OpenServer 5.0.6, I have discovered that the <Alt> key on my console keyboard no longer produces the correct characters when used in combination with other keys.

For example, a German keyboard is unable to produce the following characters:

'|', '@', '~', '\', '[', ']', '{', '}'

The problem only exists using multiscreens in character mode; not when accessing applications via the X server.

Cause

The format of the keyboard map files in /usr/lib/keyboard has changed in SCO OpenServer 5.0.6.

Solution

This problem is fixed in Release Supplement 5.0.6a (rs506a). The following discussion and workaround applies to OpenServer 5.0.6 systems which, for some reason, cannot have rs506a installed on them.

mapkey(M) looks in one of two places to decide which mapping file to use for the console keyboard. If International Settings Manager has been run since the system was installed, mapkey uses the entry in /etc/default/mapkey that gets created (which corresponds to a file in the /var/opt/K/SCO/Unix/5.0.6Ga/usr/lib/keyboard directory).

For example, if "ps.850.ibm" was specified as the keyboard type in International Settings Manager, the mapkey file will look like this:

/dev/tty01 /usr/lib/keyboard/ps.850.ger
/dev/tty02 /usr/lib/keyboard/ps.850.ger
.
.

(Files in /usr/lib/keyboard are actually links to the /var/opt/K/SCO/Unix/5.0.6Ga/usr/lib/keyboard directory.)

If International Setting Manager has not yet been run, the above entries in the mapkey file will not exist. In which case, the mapkey utility will by default use a mapping file called:

/var/opt/K/SCO/Unix/5.0.6Ga/usr/lib/keyboard/keys

This file is a copy of another from the same directory created when the keyboard type was specified during installation of the operating system.

Either of the following workarounds will correct the problem. Either workaround will also address both of the situations described above. The workarounds consist of either replacing the mapping files with the corresponding file from a 5.0.5 system, or altering the files by means of a simple sed script.

To replace the files, take the following steps:

Check the comment at the top of the existing keys file to determine which map file to copy from the 5.0.5 system:

# cd /var/opt/K/SCO/Unix/5.0.6Ga/usr/lib/keyboard
# head -2 keys

This is an example of what you might see:

#       @(#) ps.ibm.ger 92.1 00/06/15

Make a backup of the corresponding file on the local system. In this case the command would be:

# cp ps.ibm.ger ps.ibm.ger-

Then, copy the /usr/lib/keyboards/ps.ibm.ger file from a 5.0.5 system to the local system. Assuming it was placed in /tmp, copy it into the keyboard directory:

# cp /tmp/ps.ibm.ger /var/opt/K/SCO/Unix/5.0.6Ga/usr/lib/keyboard

Overwrite the keys file with the above file:

# cp ps.ibm.ger keys

Ensure the permissions are correct on both files, with the following commands:

# chown root:root keys
# chown bin:bin ps.ibm.ger
# chmod 644 keys
# chmod 644 ps.ibm.ger

To alter the files by hand, take the following steps.

Verify the name of the map file as above (this example again assumes the file is ps.ibm.ger), then:

# cd /var/opt/K/SCO/Unix/5.0.6Ga/usr/lib/keyboard

Make a backup of the map file:

# cp ps.ibm.ger ps.ibm.ger-

Use the following commands to remove the trailing '+' characters from this file:

# TMPFILE=/tmp/tmpfile_$$
# sed -e 's/+$//' < ps.ibm.ger > $TMPFILE
# mv $TMPFILE ps.ibm.ger

Then, overwrite the keys file with the edited map file:

# cp ps.ibm.ger keys

Log out from the console and back in again to make the changes take effect.

See also

keyboard(HW)

From the Xinuos technical article database, record 111506. Reproduced with permission. The original is at www.sco.com/ta/111506, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.