{
    "content": [
        {
            "type": "text",
            "text": "# setxkbmap(1) (man)\n\n**Summary:** setxkbmap - set the keyboard using the X Keyboard Extension\n\n**Synopsis:** setxkbmap [ args ] [ layout [ variant [ option ...  ] ] ]\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| — | — | — | Specifies the name of the compatibility map component used to construct a keyboard layout. |\n| — | — | — | Specifies the name of an XKB configuration file which describes the keyboard to be used. |\n| — | — | — | Specifies the numeric device id of the input device to be updated with the new key‐ board layout. If not specified, the  |\n| — | — | — | Specifies the display to be updated with the new keyboard layout. |\n| — | — | — | Specifies the name of the geometry component used to construct a keyboard layout. |\n| — | — | — |  |\n| -I | — | — | Adds a directory to the list of directories to be used to search for specified layout or rules files. |\n| — | — | — | Specifies the name of the keycodes component used to construct a keyboard layout. |\n| — | — | — | Specifies the name of the keymap description used to construct a keyboard layout. |\n| — | — | — | Specifies the name of the layout used to determine the components which make up the keyboard description. The -layout op |\n| — | — | — | Specifies the name of the keyboard model used to determine the components which make up the keyboard description. Only o |\n| — | — | — | Specifies the name of an option to determine the components which make up the key‐ board description; multiple options m |\n| — | — | — | comp (an XKB keymap compiler) and exits. The option can be used for tests instead of a verbose option and in cases when  |\n| — | — | — | options, then exits. |\n| — | — | — | Specifies the name of the rules file used to resolve the requested layout and model to a set of component names. |\n| — | — | — | Specifies the name of the symbols component used to construct a keyboard layout. |\n| — | — | — |  |\n| — | — | — | Specifies the name of the types component used to construct a keyboard layout. |\n| — | — | — | Specifies which variant of the keyboard layout should be used to determine the compo‐ nents which make up the keyboard d |\n| — | — | — | Specifies level of verbosity in output messages. Valid levels range from 0 (least verbose) to 10 (most verbose). The def |\n| — | — | — | Prints the program's version number. |\n\n## See Also\n\n- xkbcomp(1)\n- xkeyboard-config(7)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (2 lines)\n- **DESCRIPTION** (6 lines)\n- **OPTIONS** (1 lines) — 23 subsections\n  - -compat (3 lines)\n  - -config (3 lines)\n  - -device (3 lines)\n  - -display (2 lines)\n  - -geometry (2 lines)\n  - -help (1 lines)\n  - -I (3 lines)\n  - -keycodes (2 lines)\n  - -keymap (2 lines)\n  - -layout (4 lines)\n  - -model (3 lines)\n  - -option (6 lines)\n  - -print (4 lines)\n  - -query (2 lines)\n  - -rules (3 lines)\n  - -symbols (2 lines)\n  - -synch (1 lines)\n  - -types (2 lines)\n  - -variant (5 lines)\n  - -verbose|-v (4 lines)\n  - -version (2 lines)\n  - USING WITH xkbcomp (11 lines)\n  - setxkbmap us -print | xkbcomp - $DISPLAY (2 lines)\n- **SEE ALSO** (2 lines)\n- **FILES** (5 lines)\n\n## Full Content\n\n### NAME\n\nsetxkbmap - set the keyboard using the X Keyboard Extension\n\n### SYNOPSIS\n\nsetxkbmap [ args ] [ layout [ variant [ option ...  ] ] ]\n\n### DESCRIPTION\n\nThe setxkbmap command maps the keyboard to use the layout determined by the options specified\non the command line.\n\nAn XKB keymap is constructed from a number of components which are compiled only  as  needed.\nThe source for all of the components can be found in /usr/share/X11/xkb.\n\n### OPTIONS\n\n#### -compat\n\nSpecifies  the  name  of the compatibility map component used to construct a keyboard\nlayout.\n\n#### -config\n\nSpecifies the name of an XKB configuration file which describes the  keyboard  to  be\nused.\n\n#### -device\n\nSpecifies  the  numeric device id of the input device to be updated with the new key‐\nboard layout. If not specified, the core keyboard device of the X server is updated.\n\n#### -display\n\nSpecifies the display to be updated with the new keyboard layout.\n\n#### -geometry\n\nSpecifies the name of the geometry component used to construct a keyboard layout.\n\n#### -help\n\n#### -I\n\nAdds a directory to the list of directories to be used to search for specified layout\nor rules files.\n\n#### -keycodes\n\nSpecifies the name of the keycodes component used to construct a keyboard layout.\n\n#### -keymap\n\nSpecifies the name of the keymap description used to construct a keyboard layout.\n\n#### -layout\n\nSpecifies  the  name of the layout used to determine the components which make up the\nkeyboard description. The -layout option may only be used once. Multiple layouts  can\nbe specified as a comma-separated list.\n\n#### -model\n\nSpecifies  the name of the keyboard model used to determine the components which make\nup the keyboard description.  Only one model may be specified on the command line.\n\n#### -option\n\nSpecifies the name of an option to determine the components which make  up  the  key‐\nboard  description;   multiple  options  may be specified, one per -option flag. Note\nthat setxkbmap adds options specified in the command line to the  options  that  were\nset  before  (as  saved in root window properties). If you want to replace all previ‐\nously specified options, use the -option flag with an empty argument first.\n\n#### -print\n\ncomp  (an XKB keymap compiler) and exits. The option can be used for tests instead of\na verbose option and in cases when one needs to run both the setxkbmap and  the  xkb‐‐\ncomp in chain (see below).\n\n#### -query\n\noptions, then exits.\n\n#### -rules\n\nSpecifies the name of the rules file used to resolve the requested layout  and  model\nto a set of component names.\n\n#### -symbols\n\nSpecifies the name of the symbols component used to construct a keyboard layout.\n\n#### -synch\n\n#### -types\n\nSpecifies the name of the types component used to construct a keyboard layout.\n\n#### -variant\n\nSpecifies which variant of the keyboard layout should be used to determine the compo‐\nnents which make up the keyboard description. The -variant option may  only  be  used\nonce.  Multiple  variants  can  be  specified  as  a comma-separated list and will be\nmatched with the layouts specified with -layout.\n\n#### -verbose|-v\n\nSpecifies level of verbosity in output messages.  Valid levels range  from  0  (least\nverbose)  to  10  (most  verbose).  The default verbosity level is 5.  If no level is\nspecified, each -v or -verbose flag raises the level by 1.\n\n#### -version\n\nPrints the program's version number.\n\n#### USING WITH xkbcomp\n\nIf you have an Xserver and a client shell running on different computers and some XKB config‐\nuration files on those machines are different, you can get problems specifying a keyboard map\nby model, layout, and options names.  This is because setxkbmap  converts  its  arguments  to\nnames  of  XKB  configuration  files according to files that are on the client-side computer,\nthen sends these file names to the server where xkbcomp has to compose  a  complete  keyboard\nmap  using  files  which  the  server has.  Thus if the sets of files differ in some way, the\nnames that setxkbmap generates can be unacceptable on the server side.  You  can  solve  this\nproblem by running the xkbcomp on the client side too.  With the -print option setxkbmap just\nprints the file names in an appropriate format to its stdout and this output can be piped di‐\nrectly to the xkbcomp input.  For example, the command\n\n#### setxkbmap us -print | xkbcomp - $DISPLAY\n\nmakes both steps run on the same (client) machine and loads a keyboard map into the server.\n\n### SEE ALSO\n\nxkbcomp(1), xkeyboard-config(7)\n\n### FILES\n\n/usr/share/X11/xkb\n\n\n\nX Version 11                               setxkbmap 1.3.2                              SETXKBMAP(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "setxkbmap",
        "section": "1",
        "mode": "man",
        "summary": "setxkbmap - set the keyboard using the X Keyboard Extension",
        "synopsis": "setxkbmap [ args ] [ layout [ variant [ option ...  ] ] ]",
        "flags": [
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Specifies the name of the compatibility map component used to construct a keyboard layout."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Specifies the name of an XKB configuration file which describes the keyboard to be used."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Specifies the numeric device id of the input device to be updated with the new key‐ board layout. If not specified, the core keyboard device of the X server is updated."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Specifies the display to be updated with the new keyboard layout."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Specifies the name of the geometry component used to construct a keyboard layout."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-I",
                "long": null,
                "arg": null,
                "description": "Adds a directory to the list of directories to be used to search for specified layout or rules files."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Specifies the name of the keycodes component used to construct a keyboard layout."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Specifies the name of the keymap description used to construct a keyboard layout."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Specifies the name of the layout used to determine the components which make up the keyboard description. The -layout option may only be used once. Multiple layouts can be specified as a comma-separated list."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "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."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Specifies the name of an option to determine the components which make up the key‐ board 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 previ‐ ously specified options, use the -option flag with an empty argument first."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "comp (an XKB keymap compiler) and exits. The option can be used for tests instead of a verbose option and in cases when one needs to run both the setxkbmap and the xkb‐‐ comp in chain (see below)."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "options, then exits."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Specifies the name of the rules file used to resolve the requested layout and model to a set of component names."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Specifies the name of the symbols component used to construct a keyboard layout."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Specifies the name of the types component used to construct a keyboard layout."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Specifies which variant of the keyboard layout should be used to determine the compo‐ nents which make up the keyboard description. The -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."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Specifies level of verbosity in output messages. 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."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Prints the program's version number."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "xkbcomp",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/xkbcomp/1/json"
            },
            {
                "name": "xkeyboard-config",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/xkeyboard-config/7/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-compat",
                        "lines": 3
                    },
                    {
                        "name": "-config",
                        "lines": 3
                    },
                    {
                        "name": "-device",
                        "lines": 3
                    },
                    {
                        "name": "-display",
                        "lines": 2
                    },
                    {
                        "name": "-geometry",
                        "lines": 2
                    },
                    {
                        "name": "-help",
                        "lines": 1
                    },
                    {
                        "name": "-I",
                        "lines": 3,
                        "flag": "-I"
                    },
                    {
                        "name": "-keycodes",
                        "lines": 2
                    },
                    {
                        "name": "-keymap",
                        "lines": 2
                    },
                    {
                        "name": "-layout",
                        "lines": 4
                    },
                    {
                        "name": "-model",
                        "lines": 3
                    },
                    {
                        "name": "-option",
                        "lines": 6
                    },
                    {
                        "name": "-print",
                        "lines": 4
                    },
                    {
                        "name": "-query",
                        "lines": 2
                    },
                    {
                        "name": "-rules",
                        "lines": 3
                    },
                    {
                        "name": "-symbols",
                        "lines": 2
                    },
                    {
                        "name": "-synch",
                        "lines": 1
                    },
                    {
                        "name": "-types",
                        "lines": 2
                    },
                    {
                        "name": "-variant",
                        "lines": 5
                    },
                    {
                        "name": "-verbose|-v",
                        "lines": 4
                    },
                    {
                        "name": "-version",
                        "lines": 2
                    },
                    {
                        "name": "USING WITH xkbcomp",
                        "lines": 11
                    },
                    {
                        "name": "setxkbmap us -print | xkbcomp - $DISPLAY",
                        "lines": 2
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "FILES",
                "lines": 5,
                "subsections": []
            }
        ]
    }
}