Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

A linux newbie here! I own a netbook which doesn't have any indicator leds. So I decided to write a small shell script that would notify me when the capslock key is pressed. The script goes something like this:

#!/bin/bash
state=$(xset -q | grep Caps | awk '{print $4}')
if [ "$state" = "on" ]
then
notify-send "Caplock :ON"
fi

Now I want to bind the script to the capslock key so that it gets executed everytime I press the key. But the keyboard shortcuts setting expects a key combination. Is it possible to bind it to just the capslock key??

Thanks in advance!

share|improve this question
add comment

1 Answer 1

Have a look at this forum post. It may be able to help you assuming you're using Unity. You'll have to install compizconfig-settings-manager first though.

share|improve this answer
2  
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. –  RolandiXor Jan 4 '13 at 18:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.