xsconfig(X) 06 January 1993 xsconfig(X) Name xsconfig - X keyboard configuration compiler Syntax 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 scolog- in(X). 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 key- board 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 cre- ates 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. key- board files contain mappings of codes generated by specific keyboards to a character set. These files are also used to con- figure the console keyboard. Note that if you need to configure the server for non-U.S. keyboards, you will need the keyboard files included in the SCO System V Operating System Interna- tional Supplement. Together, csxmap and keyboard provide the xsconfig.sh script enough in- formation 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: + comments, preceded by a semicolon + #include commands that provide a full path to another source configu- ration file (full path is required because a search strategy is not implemented). This command must have the same syntax as the C prepro- cessor #include command. + section headers enclosed in square brackets. Configuration data is separated into the following sections: + definitions + translations + keyctrl + modifiers + keysyms These sections are described in the following paragraphs. + configuration settings or definitions in each section Definitions Configuration source files list definitions under the heading ``[defini- tions]''. 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 inter- preted as commentary. For examples, refer to the ``definitions'' section in the /usr/lib/X11/xsconfig/config.txt. Translations Configuration source files list translations under the heading ``[trans- lations]''. Each line of this section has the following syntax: scancode=translation scancode is the original scancode generated by pressing the key. trans- lation 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 ``transla- tions'' section is used to translate these two-byte scancodes to a unique single-byte keycode. For examples, refer to the ``translations'' sections 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'' sec- tion 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: + <CapsLock> + <NumLock> + <ScrollLock> + <PseudoLock> 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, refer to the ``keyctrl'' section in /usr/lib/X11/xsconfig/default.kbd. Modifiers Configuration source files list modifiers under the heading ``[modif- iers]''. 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, refer to 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 associ- ated 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 Sup- plement 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 argu- ments, 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 See also xmodmap(X), Xsco(X)