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/keysThis 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 keysThis is an example of what you might see:
# @(#) ps.ibm.ger 92.1 00/06/15Make 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/keyboardOverwrite the keys file with the above file:
# cp ps.ibm.ger keysEnsure 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.gerTo 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/keyboardMake 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.gerThen, overwrite the keys file with the edited map file:
# cp ps.ibm.ger keysLog out from the console and back in again to make the changes take effect.
See also
keyboard(HW)