xttymap(1) —
NAME
xttymap − configure the X11 server keyboard mapping
SYNOPSIS
xttymap [ −display dpy ] [ −help ] [ −noisc ] mapfile
DESCRIPTION
xttymap allows users of non-U.S. keyboards to remap keys on the keyboard in a method compatible with the ttymap utility.
The command xttymap mapfile will read the contents of the file mapfile and set the key mapping as specified in the scancode section of the input file. The format of the mapfile is described below.
Unless invoked with the −noisc option, xttymap will assume that an INTERACTIVE X11 display server is being used, and will use a built-in table to determine how to map X11 KeyCodes to keyboard scancodes. The −noisc option will use a server-independent method of determining which scancode corresponds to which X11 KeySym (as opposed to KeyCode) and then query the server for the correct KeyCode before changing the mapping. This option should be used with non-SunSoft display servers, e.g., on X terminals, and will only work correctly when the mapping currently in effect is the one for a U.S. keyboard layout.
Mapfiles
xttymap uses the same input file format as ttymap, allowing users to use the same input file with both ttymap and xttymap. (A detailed description can be found in ttymap(1).)
New acceptable values for columns 2, 3, 4, or 5 in the input file are the English descriptions of X11 KeySyms, preceded with XK_ e.g. XK_eacute. A full list of possible KeySyms can be found in /usr/include/X11/keysymdef.h. xttymap supports the LATIN1-4, GREEK, and CYRILLIC sets of KeySyms.
Functionality
xttymap will read the input file until it reaches the scancode section. The scancode section will be examined, and the server-wide mapping will be changed according to the following rules:
Each time an entry is found with a |N, |O, or |[ flag, the entry is ignored, along with entries containing only a dash. No action is taken for function key entries. With ttymap, these flags are intended to generate escape sequences or give string values to function keys. Within the X11 environment, this should be done on a per-client basis. Most X clients, such as xterm and xpcterm, provide a method to allow user-specifiable bindings for function keys.
Values found in columns 2 and 3 are used to change the keyboard mapping used when these keys are pressed alone or in conjunction with the SHIFT key. This is identical to what ttymap does. When the CAPS mnemonic is found in column 6, the KeySyms generated by the unshifted and shifted keys are swapped when CAPS LOCK is on. The CTRL and NUM mnemonics are silently ignored.
Values found in columns 4 and 5 are used to change the keyboard mapping used when these keys are pressed or shifted while the Mod3 modifier key is depressed. This is typically used to generate keys corresponding to a secondary character set, such as u-umlaut or c-cedilla, by pressing the key while holding the Mod3 key. This is similar to ttymap’s behavior with the ALT keys. By default, the X server treats both the right and left ALT keys as Mod1 modifier keys. Some clients exhibit special behavior when the Mod1 key is used, so xttymap uses Mod3 as the equivalent for ALT. (By default, the NUM LOCK key is bound to Mod2.)
To rebind the right ALT key to generate Mod3, execute the following command before using xttymap:
xmodmap -e "remove mod1 = Alt_R" -e "add mod3 = Alt_R"
FILES
/usr/lib/keyboard/*.mapsample keyboard map files
SEE ALSO
xmodmap(1).
ttymap(1) in the INTERACTIVE UNIX System User’s/System Administrator’s Reference Manual.
\*U — Version 1.0