Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How can I catch "USB events"
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
bootle
n00b
n00b


Joined: 02 Apr 2003
Posts: 21
Location: Hamburg, Germany

PostPosted: Fri Dec 07, 2007 12:44 pm    Post subject: How can I catch "USB events" Reply with quote

Hi,

my scanner has a button that triggers so called "USB events",
but no program seems to respond. How can I catch them
and/or write a script that takes proper action on their occurrence?

Thanks for help!
Back to top
View user's profile Send private message
weisso5
Apprentice
Apprentice


Joined: 07 Dec 2007
Posts: 268
Location: NYC

PostPosted: Fri Dec 07, 2007 5:26 pm    Post subject: Reply with quote

When you hit the buttons on the Scanner does it trigger any "dmesg" messages?
Back to top
View user's profile Send private message
BlackEdder
Advocate
Advocate


Joined: 26 Apr 2004
Posts: 2588
Location: Dutch enclave in Egham, UK

PostPosted: Fri Dec 07, 2007 5:30 pm    Post subject: Reply with quote

You could use something like the ruby bindings to usb to write a ruby script that listens. Alternatively the usb event should trigger a dbus/hal event (if you are using dbus), and you could look at a binding to that.


Ruby-usb: http://www.a-k-r.org/ruby-usb/
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum