PDA

View Full Version : [SOLVED] Detect CAPS LOCK with a bash script?



Dara Javaherian
January 20th, 2011, 03:21 AM
Hello all,

I have a laptop with no LED's to indicate whether or not the caps lock key is active. I was thinking of writing a bash script to do this but I can't seem to be able to detect it via the terminal. Is there any way that I can do this?

Thanks,
Dara

ghostdog74
January 20th, 2011, 08:11 AM
is your caps lock ALWAYS going to be ON? type a character on your terminal, if its CAPs, then turn it off. Why do you need a script for that?

Arndt
January 20th, 2011, 01:15 PM
Hello all,

I have a laptop with no LED's to indicate whether or not the caps lock key is active. I was thinking of writing a bash script to do this but I can't seem to be able to detect it via the terminal. Is there any way that I can do this?

Thanks,
Dara

If you have an X server running, you can use "xset -q".

Dara Javaherian
January 21st, 2011, 01:03 AM
If you have an X server running, you can use "xset -q".

Thank you! This works! I use


xset -q | grep Caps