Turn on or off CapsLock leds

From Linux Shell Scripting Tutorial - A Beginner's handbook
Jump to: navigation, search
← Turn on or off NumLock ledsHomeTurn on or off ScrollLock leds →

To turn on CapsLock, use the setleds command as follows:

setleds -D +caps

To turn off CapsLock, enter:

setleds -D -caps

Where,

  • -D : Change both the VT flags and their default settings.
  • +caps : Clear CapsLock.
  • -caps : Set CapsLock.

Note: At present, the CapsLock setting complements the Shift key when applied to letters. Pressing the CapsLock key complements the CapsLock setting.

See also

← Turn on or off NumLock ledsHomeTurn on or off ScrollLock leds →