|
|
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:
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.
These sections are described in the following paragraphs.
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.
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.
scancode is the original scancode generated by pressing the key. flag specifies one of the following locking keys:
For examples, see the ``keyctrl'' section in
/usr/lib/X11/xsconfig/default.kbd.
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.
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.