Skip to contentSkip to conversation

autodetecting usb keyboard and required modules from shell

DISCUSSION Arkadiusz Miśkiewicz 1 participant 1 message Oct 14, 2011 HID

lore
Share & tools
lore
#0 lore raw

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,

Signature · 6 lines
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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html