setleds : Command to set the keyboard leds like capslock, numlock etc.
If you want to turn on the "capslock" or the "numlock" from the command line you can use this command.
For eg to turn on the caps lock run the following
Note: You will have to be in text mode to run the command,it does not run in graphics mode
$ setleds +caps
You should see the capslock led turn on and any thing you type will be in capital. You can turn the capital off by using the caps lock key on the keyboard but the led of caps lock will continue to glow.
To turn the led off run
$ setleds -caps
The same is valid for num lock using the keyword "num" and for scroll lock using the keyword "scroll".
If you want to turn on the "capslock" or the "numlock" from the command line you can use this command.
For eg to turn on the caps lock run the following
Note: You will have to be in text mode to run the command,it does not run in graphics mode
$ setleds +caps
You should see the capslock led turn on and any thing you type will be in capital. You can turn the capital off by using the caps lock key on the keyboard but the led of caps lock will continue to glow.
To turn the led off run
$ setleds -caps
The same is valid for num lock using the keyword "num" and for scroll lock using the keyword "scroll".
Excellent Info!I got goog knowledge about this posting,Really great pleasure to reading this posting.I bookmarked this.
ReplyDeleteSounds like you had a great time with great people. That’s the way to live!Thanks for the info, too.
dedicated hosting reviews
WHAT ABOUT TURNING CAPS STATUS O I CAN TYPE IN SMALL LETTERS?
ReplyDeleteTURNING JUST LEDS IS USELESS :/
It does not just turn the leds, it actually turns caps lock on/off
DeleteI get:
ReplyDeleteKDGKBLED: Invalid argument
Error reading current flags setting. Maybe you are not on the console?
OIC, console as in tty1, etc. The problem is that when I switch back to tty7, caps is still locked on.
DeleteYes the console means the other text mode logins,
DeleteThe capslock does not stay on tty7 for me, which distro are you using ?
I'm using Kubuntu.
DeleteI have tries it on ubuntu and debian, both gnome based, not sure if the behavior changes in kubuntu. Will try to verify
DeleteI can't imagine that Kubuntu would differ so much from vanilla Ubuntu either. I had to uninstall ibus at one stage to get my compose key working in all applications. I'm not sure if it relates to that.
Delete