SETLEDS(1)
โจ SETLEDS โจ
okay bestie so this is setleds from the kbd manual, and it's literally the little tool that sets your keyboard leds ๐ก โ no cap.
๐ธ SYNOPSIS ๐ธ
setleds [-v] [-L] [-D] [-F] [{+|-}num] [{+|-}caps] [{+|-}scroll]
๐ DESCRIPTION ๐
so basically setleds reports and changes the led flag settings of a VT โ that's NumLock, CapsLock and ScrollLock ๐. Run it with no arguments and it just prints the current settings, like a vibe check for your keyboard. Give it arguments and it sets or clears the flags you named (and leaves all the others exactly how they were, it's very respectful like that ๐ซถ). And if you pass the -v flag, it'll tell you the settings before and after the change. receipts. ๐
the led flag settings are specific for each VT (and it's the VT that corresponds to stdin that gets used) โจ
by default (or with option -F), setleds will only change the VT flags (and their setting may be reflected by the keyboard leds).
with option -D, setleds will change both the VT flags and their default settings (so that a subsequent reset will not undo the change). this is lowkey so useful for people who always want to have numlock set ๐
with option -L, setleds will not touch the VT flags, but only change the leds. from this moment on, the leds will no longer reflect the VT flags (but display whatever is put into them) ๐ญ. the command setleds -L (without further arguments) will restore the situation in which the leds reflect the VT flags ๐
one might use setleds in /etc/rc to define the initial and default state of NumLock, e.g. by
INITTY=/dev/tty[1-8]
for tty in $INITTY; do
setleds -D +num < $tty
done
โจ OPTIONS โจ
-num+numโ clear or set NumLock. (at present, the NumLock setting influences the interpretation of keypad keys. pressing the NumLock key complements the NumLock setting.)-caps+capsโ clear or set CapsLock. (at present, the CapsLock setting complements the Shift key when applied to letters. pressing the CapsLock key complements the CapsLock setting.)-scroll+scrollโ clear or set ScrollLock. (at present, pressing the ScrollLock key (or^S/^Q) stops/starts console output.)
๐ BUGS ๐
in keyboard application mode the NumLock key does not influence the NumLock flag setting. yes fr, that's just how it is ๐
๐ AUTHORS ๐
Andries Brouwer <aeb@cwi.nl>
๐ฆ SEE ALSO ๐ฆ
okay that's the whole page, you ate that ๐ this was the kbd manual, version dated 24 Sep 1994 โ slay, periodt ๐โจ
๐ฆ where this page comes from
- alpine 3.22: kbd-doc 2.7.1-r1 ยท GPL-2.0-or-later
- alpine 3.23: kbd-doc 2.8.0-r0 ยท GPL-2.0-or-later
- alpine 3.24: kbd-doc 2.8.0-r0 ยท GPL-2.0-or-later
- arch rolling: kbd 2.10.0-1 ยท GPL-2.0-or-later
- fedora 43: kbd 2.8.0-3.fc43 ยท GPL-2.0-or-later
- fedora 43: kbd 2.8.0-4.fc43 ยท GPL-2.0-or-later
- fedora 44: kbd 2.9.0-3.fc44 ยท GPL-2.0-or-later
- fedora 44: kbd 2.9.0-4.fc44 ยท GPL-2.0-or-later
- nixos 26.05: kbd 2.9.0
- nixos 26.05: kbd-vlock 2.9.0
- nixpkgs unstable: kbd 2.9.0
- nixpkgs unstable: kbd-vlock 2.9.0
- opensuse-leap 16.0: kbd 2.7.1-160000.3.1 ยท GPL-2.0-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: kbd 2.7.1-160000.3.1 ยท GPL-2.0-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: kbd 2.7.1-160000.3.1 ยท GPL-2.0-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: kbd 2.7.1-160000.3.1 ยท GPL-2.0-or-later AND GPL-3.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms