DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Customizing device character mapping

Using kbdload and kbdset to load and configure KBD maps

This section describes how to perform code set mappings on the STREAMS- based TTY line of your terminal or printer. (This can be used for peripherals that use a different code set than the one used internally.)

Once the KBD module is configured in your STREAM, you must make sure that any mapping tables you require are loaded. Tables are loaded using the kbdload command.

For example: this command loads the 88591.cpz map:

kbdload /usr/lib/kbd/88591.cpz


NOTE: Any tables loaded in this way will only be available to you. Details of how to load tables so that they are publicly available to all users on the system are given in "Building Code Set, Keyboard, and Font Maps."

To determine the code set mapping currently used on your terminal, enter:

kbdset -q

This will display the currently loaded code set mapping tables and those that are attached to the input and output sides of your terminal's STREAM. A typical output generated by kdbset -q is shown below:

   Timers:  In = 20 ; Out = 20
   ID         Name          Size        I/O   Ref   Cmp     Type
   d108d980   88591.cpz        123      - -     2     -      pri
   d108a564   646ES.88591.d    410      - -     0     -      pub
   d108a980   88591.646ES.d    421      - -     0     -      pub
   d108b100   646ES.88591.d.c  223      - -     0     -      pub
This shows that there are three code set mapping tables publicly loaded and one privately loaded.


NOTE: If there are no code set mappings loaded, this command will display nothing.

Code set mapping tables may be attached to either or both of the input and output side of a STREAM.

To attach a code set mapping to the input side of the STREAM, type

kbdset -a map_name

where map_name is the name of the code set mapping table. To attach a code set mapping table to the output side of the STREAM, replace the kbdset option -a with -oa.


NOTE: To provide correct code set mapping it is normal to attach maps to both sides of the STREAM, for example, 437.88591.d and 88591.437.d.

To detach a code set mapping table from the input side of the STREAM, type

kbdset -d map_name

where map_name is the name of the code set mapping table. Again, to detach a code set mapping table from the output side of the STREAM, replace the kbdset option -d with -od.


NOTE: Multiple code set mapping tables can be attached on both the input and output side of the STREAM. This is described in kbdset(1).

For example, to map an internal code set, ISO 8859-1, to the Spanish ISO 646 national variant (646ES) using the default mapping type:

kbdset -a 646ES.88591.d
kbdset -oa 88591.646ES.d

This attaches maps to both the input and output sides of the STREAM to make the mapping transparent to the user.

Remember, these mappings must be loaded using the kbdload command, or must be publicly loaded by the super-user before they can be attached.


Next topic: Using kbdload to configure your compose key mapping table
Previous topic: Shell script to reconfigure a STREAM

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 22 April 2004