{
    "content": [
        {
            "type": "text",
            "text": "# SETKEYCODES (info)\n\n## NAME\n\nsetkeycodes - load kernel scancode-to-keycode mapping table entries\n\n## SYNOPSIS\n\nsetkeycodes scancode keycode ...\n\n## DESCRIPTION\n\nThe setkeycodes command reads its arguments two at a time, each pair of\narguments consisting of a scancode (given in hexadecimal) and a keycode\n(given  in  decimal).  For each such pair, it tells the kernel keyboard\ndriver to map the specified scancode to the specified keycode.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **THEORY**\n- **OPTIONS**\n- **BUGS**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "SETKEYCODES",
        "section": "",
        "mode": "info",
        "summary": "setkeycodes - load kernel scancode-to-keycode mapping table entries",
        "synopsis": "setkeycodes scancode keycode ...",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "dumpkeys",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/dumpkeys/1/json"
            },
            {
                "name": "loadkeys",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/loadkeys/1/json"
            },
            {
                "name": "showkey",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/showkey/1/json"
            },
            {
                "name": "getkeycodes",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/getkeycodes/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "THEORY",
                "lines": 27,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "setkeycodes - load kernel scancode-to-keycode mapping table entries\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "setkeycodes scancode keycode ...\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The setkeycodes command reads its arguments two at a time, each pair of\narguments consisting of a scancode (given in hexadecimal) and a keycode\n(given  in  decimal).  For each such pair, it tells the kernel keyboard\ndriver to map the specified scancode to the specified keycode.\n\nThis command is useful only for people with slightly unusual keyboards,\nthat  have  a few keys which produce scancodes that the kernel does not\nrecognize.\n",
                "subsections": []
            },
            "THEORY": {
                "content": "The usual PC keyboard produces a series of scancodes for each key press\nand  key  release. (Scancodes are shown by showkey -s, see showkey(1) )\nThe kernel parses this stream of scancodes, and converts it to a stream\nof  keycodes  (key  press/release  events).   (Keycodes  are  shown  by\nshowkey.)  Apart from a few scancodes with special meaning,  and  apart\nfrom  the sequence produced by the Pause key, and apart from shiftstate\nrelated scancodes, and apart from the key up/down bit,  the  stream  of\nscancodes consists of unescaped scancodes xx (7 bits) and escaped scan-\ncodes e0 xx (8+7 bits).  To these scancodes or scancode pairs, a corre-\nsponding keycode can be assigned (in the range 1-127).  For example, if\nyou have a Macro key that produces e0 6f according to  showkey(1),  the\ncommand\nsetkeycodes e06f 112\nwill  assign the keycode 112 to it, and then loadkeys(1) can be used to\ndefine the function of this key.\n\nSome older kernels might hardwire a low scancode range to  the  equiva-\nlent keycodes; setkeycodes will fail when you try to remap these.\n\n2.6 KERNELS\nIn 2.6 kernels key codes lie in the range 1-255, instead of 1-127.  (It\nmight be best to confine oneself to the range 1-239.)\n\nIn 2.6 kernels raw mode, or scancode mode, is not very raw at all.  The\ncode  returned  by  showkey -s will change after use of setkeycodes.  A\nkernel bug. See also showkey(1).\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "None.\n",
                "subsections": []
            },
            "BUGS": {
                "content": "The keycodes of X have nothing to do with those of Linux.  Unusual keys\ncan be made visible under Linux, but not under X.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "dumpkeys(1), loadkeys(1), showkey(1), getkeycodes(8)\n\nkbd                               8 Nov 1994                    SETKEYCODES(8)",
                "subsections": []
            }
        }
    }
}