Results 1 to 4 of 4

Thread: Detect CAPS LOCK with a bash script?

  1. #1
    Join Date
    Aug 2009
    Beans
    37

    Question Detect CAPS LOCK with a bash script?

    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

  2. #2
    Join Date
    Sep 2006
    Beans
    2,914

    Re: Detect CAPS LOCK with a bash script?

    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?

  3. #3
    Join Date
    May 2006
    Beans
    1,790

    Re: Detect CAPS LOCK with a bash script?

    Quote Originally Posted by Dara Javaherian View Post
    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".

  4. #4
    Join Date
    Aug 2009
    Beans
    37

    Re: Detect CAPS LOCK with a bash script?

    Quote Originally Posted by Arndt View Post
    If you have an X server running, you can use "xset -q".
    Thank you! This works! I use

    Code:
    xset -q | grep Caps

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •