1SETXKBMAP(1) General Commands Manual SETXKBMAP(1)
2
3
4
6 setxkbmap - set the keyboard using the X Keyboard Extension
7
9 setxkbmap [ args ] [ layout [ variant [ option ... ] ] ]
10
12 The setxkbmap command maps the keyboard to use the layout determined by
13 the options specified on the command line.
14
15 An XKB keymap is constructed from a number of components which are com‐
16 piled only as needed. The source for all of the components can be
17 found in /usr/share/X11/xkb.
18
20 -help Prints a message describing the valid input to setxkbmap.
21
22 -compat name
23 Specifies the name of the compatibility map component used to
24 construct a keyboard layout.
25
26 -config file
27 Specifies the name of an XKB configuration file which describes
28 the keyboard to be used.
29
30 -device device
31 Specifies the numeric device id of the input device to be
32 updated with the new keyboard layout. If not specified, the
33 core keyboard device of the X server is updated.
34
35 -display display
36 Specifies the display to be updated with the new keyboard lay‐
37 out.
38
39 -geometry name
40 Specifies the name of the geometry component used to construct
41 a keyboard layout.
42
43 -I directory
44 Adds a directory to the list of directories to be used to
45 search for specified layout or rules files.
46
47 -keycodes name
48 Specifies the name of the keycodes component used to construct
49 a keyboard layout.
50
51 -keymap name
52 Specifies the name of the keymap description used to construct
53 a keyboard layout.
54
55 -layout name
56 Specifies the name of the layout used to determine the compo‐
57 nents which make up the keyboard description. The -layout
58 option may only be used once. Multiple layouts can be specified
59 as a comma-separated list.
60
61 -model name
62 Specifies the name of the keyboard model used to determine the
63 components which make up the keyboard description. Only one
64 model may be specified on the command line.
65
66 -option name
67 Specifies the name of an option to determine the components
68 which make up the keyboard description; multiple options may
69 be specified, one per -option flag. Note that setxkbmap adds
70 options specified in the command line to the options that were
71 set before (as saved in root window properties). If you want to
72 replace all previously specified options, use the -option flag
73 with an empty argument first.
74
75 -print With this option setxkbmap just prints component names in a
76 format acceptable by xkbcomp (an XKB keymap compiler) and
77 exits. The option can be used for tests instead of a verbose
78 option and in cases when one needs to run both the setxkbmap
79 and the xkbcomp in chain (see below).
80
81 -query With this option setxkbmap just prints the current rules,
82 model, layout, variant, and options, then exits.
83
84 -rules file
85 Specifies the name of the rules file used to resolve the
86 requested layout and model to a set of component names.
87
88 -symbols name
89 Specifies the name of the symbols component used to construct a
90 keyboard layout.
91
92 -synch Force synchronization for X requests.
93
94 -types name
95 Specifies the name of the types component used to construct a
96 keyboard layout.
97
98 -variant name
99 Specifies which variant of the keyboard layout should be used
100 to determine the components which make up the keyboard descrip‐
101 tion. The -variant option may only be used once. Multiple vari‐
102 ants can be specified as a comma-separated list and will be
103 matched with the layouts specified with -layout.
104
105 -verbose|-v [level]
106 Specifies level of verbosity in output messages. Valid levels
107 range from 0 (least verbose) to 10 (most verbose). The default
108 verbosity level is 5. If no level is specified, each -v or
109 -verbose flag raises the level by 1.
110
112 If you have an Xserver and a client shell running on different comput‐
113 ers and XKB configuration files on those machines are different you can
114 get problems specifying a keyboard map by model, layout, options names.
115 This is because setxkbcomp converts these names to names of XKB config‐
116 uration files according to files that are on the client side computer,
117 then it sends the file names to the server where the xkbcomp has to
118 compose a complete keyboard map using files which the server has. Thus
119 if the sets of files differ significantly the names that the setxkbmap
120 generates can be unacceptable on the server side. You can solve this
121 problem by running the xkbcomp on the client side too. With the -print
122 option setxkbmap just prints the file names in an appropriate format to
123 its stdout and this output can be piped directly to the xkbcomp input.
124 For example, the command
125
126 setxkbmap us -print | xkbcomp - $DISPLAY
127
128 makes both steps run on the same (client) machine and loads a keyboard
129 map into the server.
130
132 xkbcomp(1), xkeyboard-config(7)
133
135 /usr/share/X11/xkb
136
137
138
139X Version 11 setxkbmap 1.3.0 SETXKBMAP(1)