autodetecting usb keyboard and required modules from shell

From: Arkadiusz Miśkiewicz <hidden>
Date: 2011-10-14 21:08:37

Hi,

I'm trying to find a simple way to detect that usb keyboard is being used in 
running system (so the required modules are already loaded etc) and then 
figure out which modules drive that keyboard.

The hard part is that I'm trying to do that from shell by simply looking into 
procfs or sysfs. (no usbutils, no udev available).

/proc/bus/input/devices looks like good place to start but how to distinguish 
keyboards there from other devices (for example my usb keyboard is named 
"Winbond Electronics Corp Hermon USB hidmouse Device" there) ?

I see that kernel reports some keyboards as "USB HID v1.00 Keyboard" for 
example but does it report that info somewhere in sysfs?

Any hints welcome.

Thanks,
-- 
Arkadiusz Miśkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help