-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, 20 Dec 2002 04:58, Anton wrote:
> I have usb keyboard and i need to read events from it with shell script
> (evdev module gives /dev/input/event[0|1] file, from which I read with
> hexdump). While testing, I found that for the same keyboard the event file
> is different on different systems (event1 at my home, event0 at work). How
> could I (and my script) determine exactly from where to read for this
> keyboard events?
The normal answer is to use the EVIOCGID ioctl. But you can't do that from a 
shell script. 

> Probably I must get dmesg, found last line and get event file number? Or
> get it from /proc/bus/usb/devices?
/proc/bus/usb/devices won't help. There isn't any correlation between event 
file number and the usb device number.
You could parse /proc/bus/input/devices in 2.5, but that hasn't been 
backported to 2.4 yet.
So I guess that you are up for either a helper app, or parsing dmesg.

Brad

- -- 
http://linux.conf.au. 22-25Jan2003. Perth, Aust. I'm registered. Are you?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE+AvGWW6pHgIdAuOMRAlTuAJkBd/cu71Q8+Lwl/ROR3Jj2nIvbCACfQmUt
167FV10/LwnmeW/x/Ev0eMQ=
=iMDi
-----END PGP SIGNATURE-----



-------------------------------------------------------
This SF.NET email is sponsored by:  The Best Geek Holiday Gifts!
Time is running out!  Thinkgeek.com has the coolest gifts for
your favorite geek.   Let your fingers do the typing.   Visit Now.
T H I N K G E E K . C O M        http://www.thinkgeek.com/sf/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to