{
    "mode": "man",
    "parameter": "setleds",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/setleds/1/json",
    "generated": "2026-06-13T19:43:01Z",
    "synopsis": "setleds [-v] [-L] [-D] [-F] [{+|-}num] [{+|-}caps] [{+|-}scroll]",
    "sections": {
        "NAME": {
            "content": "setleds - set the keyboard leds\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "setleds [-v] [-L] [-D] [-F] [{+|-}num] [{+|-}caps] [{+|-}scroll]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Setleds  reports  and  changes  the  led  flag settings of a VT (namely NumLock, CapsLock and\nScrollLock).  Without arguments, setleds prints the current  settings.   With  arguments,  it\nsets  or  clears  the indicated flags (and leaves the others unchanged).  The settings before\nand after the change are reported if the -v flag is given.\n\nThe led flag settings are specific for each VT (and the VT corresponding to stdin is used).\n\nBy default (or with option -F), setleds will only change the VT flags (and their setting  may\nbe reflected by the keyboard leds).\n\nWith  option  -D, setleds will change both the VT flags and their default settings (so that a\nsubsequent reset will not undo the change).  This might be useful for people who always  want\nto have numlock set.\n\nWith option -L, setleds will not touch the VT flags, but only change the leds.  From this mo‐\nment on, the leds will no longer reflect the VT flags  (but  display  whatever  is  put  into\nthem).   The  command  setleds  -L  (without further arguments) will restore the situation in\nwhich the leds reflect the VT flags.\n\nOne might use setleds in /etc/rc to define the initial and default state of NumLock, e.g. by\nINITTY=/dev/tty[1-8]\nfor tty in $INITTY; do\nsetleds -D +num < $tty\ndone\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "-num +num\nClear or set NumLock.  (At present, the NumLock setting influences the  interpretation\nof keypad keys.  Pressing the NumLock key complements the NumLock setting.)\n\n-caps +caps\nClear  or  set  CapsLock.  (At present, the CapsLock setting complements the Shift key\nwhen applied to letters.  Pressing the CapsLock key complements the CapsLock setting.)\n\n-scroll +scroll\nClear or set  ScrollLock.   (At  present,  pressing  the  ScrollLock  key  (or  ^S/^Q)\nstops/starts console output.)\n",
            "subsections": []
        },
        "BUGS": {
            "content": "In keyboard application mode the NumLock key does not influence the NumLock flag setting.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "loadkeys(1)\n\n\n\n\nkbd                                          24 Sep 1994                                  SETLEDS(1)",
            "subsections": []
        }
    },
    "summary": "setleds - set the keyboard leds",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "loadkeys",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/loadkeys/1/json"
        }
    ]
}