DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Version 11 (Release 6.1)

xsconfig(X1M)


xsconfig -- X keyboard configuration compiler

Synopsis

xsconfig [-o configfile] sourcefile [ . . . ]

Description

xsconfig compiles a keyboard configuration file for the Xsco server. If you do not specify an output configuration file with the -o option, xsconfig creates .Xsco.cfg in the current working directory.

On startup, the server reads the file /usr/lib/X11/.Xsco.cfg to set the initial configuration. If the file $HOME/.Xsco.cfg exists, the server reads it instead of /usr/lib/X11/.Xsco.cfg. The server also reads the configuration file if it is reset by a display manager such as scologin. Key mappings may be changed after starting the server with the xmodmap utility.

Although xsconfig accepts multiple filenames as command line arguments, you usually need only change one or two files to achieve any desired keyboard modifications. Because xsconfig's command line can become unwieldy, and because it provides minimal syntax error detection, use the /usr/lib/X11/xsconfig/xsconfig.sh script instead of running xsconfig. The xsconfig.sh script uses the following command line syntax:

/usr/lib/X11/xsconfig/xsconfig.sh [csxmap keyboard]

xsconfig.sh must be run as root from the /usr/lib/X11/xsconfig directory. When the script exits, you must move the new configuration file, .Xsco.cfg, into /usr/lib/X11 or into a user's $HOME directory. The new configuration file will take effect the next time the server starts.

If the csxmap and keyboard arguments are not supplied, xsconfig.sh creates a configuration file for the default, U.S. IBM-compatible, keyboard. In the default configuration, the <Alt_R> key is attached to the mod1 modifier, and the ``group modifier,'' Mode_Switch, is not defined. For details see ``Modifiers'' and ``Keysyms.''

If you need to create a configuration file for non-U.S. keyboards, you must supply the following two arguments:


csxmap
pathname of a file from the /usr/lib/X11/csxmaps directory. csxmap files contain mappings of specific character sets to X keysyms.

keyboard
pathname of a file in the /usr/lib/keyboard directory. keyboard files contain mappings of codes generated by specific keyboards to a character set. These files are also used to configure the console keyboard.

Together, csxmap and keyboard provide the xsconfig.sh script enough information to enable it to create new configuration source files for xsconfig. When you create a configuration file for non-U.S. keyboards, the <Alt_R> key is the ``group modifier,'' Mode_Switch, and is attached to the mod3 modifier.

Configuration source files

xsconfig processes multiple source files in sequence. A configuration source file is a text file that contains the following types of data:

Definitions

Configuration source files list definitions under the heading ``[definitions]''. Each line of this section has the following syntax: #define name value

name is a sequence of letters, numbers, and underscores. Valid names are a superset of name values in C preprocessor #define commands. name must contain at least one non-digit.

value must be either a number sequence or a string enclosed in quotation marks ("). There is currently no use for string definitions. There is no expression evaluator, so numeric values must be a single number using C conventions for specifying octal, decimal, and hexadecimal numbers.

The primary purpose of this section is to include the file /usr/lib/X11/xsconfig/keysymdef.h which defines the key symbol values. Any line in this section not beginning with #define or #include is interpreted as commentary.

For examples, see the ``definitions'' section in /usr/lib/X11/xsconfig/config.txt.

Translations

Configuration source files list translations under the heading ``[translations]''. Each line of this section has the following syntax:

scancode=translation

scancode is the original scancode generated by pressing the key. translation is a translated keycode.

On 101-key personal computer keyboards, the dedicated cursor keys produce two-byte scancodes. The first byte is always ``0xE0''. The second byte is the scancode of the corresponding numeric keypad key. The ``translations'' section is used to translate these two-byte scancodes to a unique single-byte keycode.

For examples, see the ``translations'' section in /usr/lib/X11/xsconfig/trans101.kbd.

Keyctrl

The ``[keyctrl]'' section of configuration source files attaches any of several control flags to particular keys. The keys are specified by their scancodes as in the ``translations'' section. The ``translations'' section has no effect on the scancodes specified in the ``keyctrl'' section. Each line in the ``keyctrl'' section has the following syntax:

scancode: flag [flag . . .]

scancode is the original scancode generated by pressing the key. flag specifies one of the following locking keys:

In each case, the LED reflects the state of the key. In the case of <PseudoLock>, locking is simulated, and no keyboard LED is associated with the key. Any number of keys may have this attribute. Only one key should be associated with each of the keyboard LEDs.

For examples, see the ``keyctrl'' section in /usr/lib/X11/xsconfig/default.kbd.

Modifiers

Configuration source files list modifiers under the heading ``[modifiers]''. This section defines the modifier keys, such as <Shift>, <Caps Lock>, <Ctrl>, <Alt>, and <Mode_Switch>. Each line of this section has the following syntax:

keycode: modifiername

keycode is the keycode, possibly translated, for the key. keycode ranges from 0 to whatever range of values the keyboard can generate.

modifiername is one of ``Shift'', ``Lock'', ``Control'', or``Mod1'' through ``Mod5''. The SCO convention is to use ``Mod1'' for the right <Alt> key.

For examples, see the ``modifiers'' section in /usr/lib/X11/xsconfig/mod.usa.kbd and /usr/lib/X11/xsconfig/mod.intl.kbd.

Keysyms

Configuration source files list keysyms under the heading ``[keysyms]''. This section provides the mapping between keycodes and the glyphs associated with each key. Each line of this section has the following syntax:

keycode: keysymlist

keycode is the keycode, possibly translated, for the key. keycode ranges from 0 to whatever range of values the keyboard can generate.

keysymlist is a list of keysyms, separated by white space. Each keysym corresponds to a legend (glyph) on the key. The /usr/lib/X11/xsconfig/keysymdef.h file is useful for choosing keysym names. Each keysym definition is prefaced with the string XK_, which should be omitted when specifying keysyms in the ``modifiers'' section.

The translation currently used by most clients associates the first keysym in keysymlist with the unshifted state and the second keysym, if present, with the shifted state. For the alphabetic keys, only the uppercase keysym is specified and the value is converted to lowercase when unshifted.

Many non-U.S. keyboards have more than two symbols on some keys. A modifier key, referred to as the ``Mode Switch'' key, is used to switch to a second group of symbols. Conventionally, the default Mode Switch key is labeled <AltGr>, though the right <Alt> key is often used. You can make any key the Mode Switch key by attaching a modifier bit (``Mod1'' though ``Mod5'') to the key in the ``modifiers'' section. By default, the Mode Switch key is undefined unless the International Supplement is installed, in which case the convention is to use ``Mod3''. When the Mode Switch key is pressed, the third keysym in keysymlist is associated with the unshifted key, and the fourth keysym is associated with the shifted key.

The xsconfig.sh script, if passed no arguments, creates /usr/lib/X11/.Xsco.cfg without defining the Mode Switch key. If the International Supplement is installed, you can supply two arguments to xsconfig.sh. The first argument must be a file from the /usr/lib/X11/csxmaps directory. The second argument must be a keyboard definition file from /usr/lib/keyboard. When you supply these two arguments, xsconfig.sh creates /usr/lib/X11/.Xsco.cfg with the Mode Switch key defined as ``Mod3''.

It is the responsibility of the clients to interpret the association of the modifier bit with the new keysyms.

For examples, see the ``keysyms'' section in /usr/lib/X11/xsconfig/default.kbd. and /usr/lib/X11/xsconfig/misc.kbd.

Files

/usr/lib/X11/.Xsco.cfg
/usr/lib/X11/xsconfig/config.txt
/usr/lib/X11/xsconfig/default.kbd
/usr/lib/X11/xsconfig/misc.kbd
/usr/lib/X11/xsconfig/mod.intl.kbd
/usr/lib/X11/xsconfig/mod.usa.kbd
/usr/lib/X11/xsconfig/trans101.kbd
/usr/lib/X11/xsconfig/keysymdef.h
/usr/lib/X11/xsconfig/xsconfig.sh

References

xmodmap(X1M), Xsco(X1M)


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