User Commands SETXKBMAP(1)
NAME
setxkbmap - set the keyboard using the X Keyboard Extension
SYNOPSIS
/usr/bin/setxkbmap [ args ] [ layout [ variant [ option ...
] ] ]DESCRIPTION
The setxkbmap command maps the keyboard to use the layout
determined by the options specified on the command line. An XKB keymap is constructed from a number of components which are compiled only as needed. The source for all ofthe components can be found in /usr/share/X11/xkb. OPTIONS
-help Prints a message describing the valid input to
setxkbmap.
-compat name
Specifies the name of the compatibility map com-
ponent used to construct a keyboard layout.-config file
Specifies the name of an XKB configuration file which describes the keyboard to be used.-device device
Specifies the numeric device id of the input device to be updated with the new keyboard layout. If not specified, the core keyboard device of the X server is updated.-display display
Specifies the display to be updated with the new keyboard layout.-geometry name
Specifies the name of the geometry component used to construct a keyboard layout.-I directory
Adds a directory to the list of directories to be used to search for specified layout or rules files.-keycodes name
Specifies the name of the keycodes component used to construct a keyboard layout.-keymap name
Specifies the name of the keymap description used to construct a keyboard layout.X Version 11 Last change: setxkbmap 1.1.0 1
User Commands SETXKBMAP(1)-layout name
Specifies the name of the layout used to determinethe components which make up the keyboard descrip-
tion. Only one layout may be specified on the com-
mand line.-model name
Specifies the name of the keyboard model used to determine the components which make up the keyboard description. Only one model may be specified on the command line.-option name
Specifies the name of an option to determine the components which make up the keyboard description;multiple options may be specified, one per -option
flag. Note that setxkbmap adds options specified in
the command line to the options that were set before (as saved in root window properties). If you want to replace all previously specified options, use the-option flag with an empty argument first.
-print With this option the setxkbmap just prints component
names in a format acceptable by xkbcomp (an XKB key-
map compiler) and exits. The option can be used for tests instead of a verbose option and in cases whenone needs to run both the setxkbmap and the xkbcomp
in chain (see below).-rules file
Specifies the name of the rules file used to resolve the requested layout and model to a set of component names.-symbols name
Specifies the name of the symbols component used to construct a keyboard layout.-synch Force synchronization for X requests.
-types name
Specifies the name of the types component used to construct a keyboard layout.-variant name
Specifies which variant of the keyboard layout should be used to determine the components which make up the keyboard description. Only one variant may be specified on the command line.-verbose|-v [level]
Specifies level of verbosity in output messages.X Version 11 Last change: setxkbmap 1.1.0 2
User Commands SETXKBMAP(1) Valid levels range from 0 (least verbose) to 10 (most verbose). The default verbosity level is 5.If no level is specified, each -v or -verbose flag
raises the level by 1. USING WITH xkbcompIf you have an Xserver and a client shell running on dif-
ferent computers and XKB configuration files on those machines are different you can get problems specifying a keyboard map by model, layout, options names. This isbecause setxkbcomp converts these names to names of XKB con-
figuration files according to files that are on the client side computer, then it sends the file names to the server where the xkbcomp has to compose a complete keyboard map using files which the server has. Thus if the sets of filesdiffer significantly the names that the setxkbmap generates
can be unacceptable on the server side. You can solve this problem by running the xkbcomp on the client side too. Withthe -print option setxkbmap just prints the file names in an
appropriate format to its stdout and this output can bepiped directly to the xkbcomp input. For example, the com-
mandsetxkbmap us -print | xkbcomp - $DISPLAY
makes both steps run on the same (client) machine and loads a keyboard map into the server.SEE ALSO
xkbcomp(1) FILES/usr/share/X11/xkb
ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Availability | x11/keyboard/xkb-utilities |
|_____________________________|_____________________________|
| Interface Stability | Committed ||_____________________________|_____________________________|
X Version 11 Last change: setxkbmap 1.1.0 3