>________________________________
> De : basilio <[email protected]>
>À : [email protected] 
>Envoyé le : Vendredi 13 avril 2012 21h18
>Objet : Re: Cups/Num Lock change event
> 
>Hi to all!
>
>I understand that my question is not as easy as changing background and
>all that bells and whistles and really needs an expert. But anyway I
>need some help. I believe that this can be done somehow using signals. I
>just can't understand how to catch the event of pressing Cups/Num Lock
>button other way than awful.key(). This is too complicated for me
>unfortunately. Can somebody give a clue? The rest I could have done myself.
>
>Thanks ahead.
>
>P.S. awful.key({},"Caps_Lock", ) gets the keypress event right and caps
>lock even toggles, but it forces unwanted keyboard layout change of the
>current window either.
>
>07.04.2012 23:41, basilio пишет:
>> Hi to all!
>> 
>> Is there a way to trace Cups/Num lock change event from rc.lua?
>> (Other than awful.key({ }, "Caps_Lock", ))
>> I need that for triggering update of the widget with Cups & Num locks
>> state. Thanks ahead.
>> 
>> 

Hi, 


Did you try with xset ?

mytextbox = widget({ type = "textbox" })
mytextbox.text = io.popen("xset q | grep Num |awk '{print $8}'"):read("*all") 

with a link to a Timer, but it's not efficient ...


--
To unsubscribe, send mail to [email protected].

Reply via email to