View previous topic :: View next topic |
Author |
Message |
bootle n00b
Joined: 02 Apr 2003 Posts: 21 Location: Hamburg, Germany
|
Posted: Fri Dec 07, 2007 12:44 pm Post subject: How can I catch "USB events" |
|
|
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 |
|
|
weisso5 Apprentice
Joined: 07 Dec 2007 Posts: 268 Location: NYC
|
Posted: Fri Dec 07, 2007 5:26 pm Post subject: |
|
|
When you hit the buttons on the Scanner does it trigger any "dmesg" messages? |
|
Back to top |
|
|
BlackEdder Advocate
Joined: 26 Apr 2004 Posts: 2588 Location: Dutch enclave in Egham, UK
|
Posted: Fri Dec 07, 2007 5:30 pm Post subject: |
|
|
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 |
|
|
|