| SETXKBMAP(1) | General Commands Manual | SETXKBMAP(1) |
setxkbmap — set
keymaps and layouts via the X Keyboard Extension
setxkbmap |
[options] [layout [variant [option ...]]] |
The setxkbmap utility maps the keyboard to
use the specified layout in an X(7)
session. For a table of available layouts and options, see
xkeyboard-config(7).
The options are as follows:
-?, -helpsetxkbmap.-compat
name-config
file-device
deviceid-display
display-geometry
name-I
directory-keycodes
name-keymap
name-layout
name-layout option
may only be used once. Multiple layouts can be specified as a
comma-separated list.-model
name-option
name-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.-printsetxkbmap
and xkbcomp(1) utilities in
chain (see below).-query-rules
file-symbols
name-synch-types
name-variant
name-variant option may only be used once. Multiple
variants can be specified as a comma-separated list and will be matched
with the layouts specified with -layout.-v[erbose]
[level]-v or
-verbose flag raises the level by 1.-versionAn XKB keymap is constructed from a number of components which are
compiled only as needed by converting the arguments to the names of XKB
configuration files in /usr/X11R7/lib/X11/xkb on the
X(7) client. Those filenames are
then passed to the Xorg(1)
server, unless printed to
stdout(4), with
-print.
The setxkbmap utility exits 0 on
success, and >0 if an error occurs.
Rebind the Caps Lock key as an additional Left Control:
setxkbmap -option
ctrl:nocapsSet the layout to US, composing the keymap on the client for situations where XKB component files may differ between the Xserver(1) and client:
setxkbmap us -print | xkbcomp -
$DISPLAYReset XKB options:
setxkbmap -optionDISPLAY environment variable.setxkbmap first appeared in XFree86
3.2.
| March 29, 2025 | NetBSD 11.99 |