Detecting the keyboard

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hello Friends,
How can an application written for Linux environment detect USB
Keyboard connected to the system?
Regards


Mandar Sarpotdar

Re: Detecting the keyboard
Hi Mandar,
Quoted text here. Click to load it
By talking to the usb/kernel drivers, like the hotplug program does.

There are a few different ways to get USB keyboard support working,
make sure you're using the correct way for your particular setup.

Regards,

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Damion de Soto - Software Engineer  email:     snipped-for-privacy@snapgear.com
We've slightly trimmed the long signature. Click to see the full one.
Re: Detecting the keyboard
Quoted text here. Click to load it

I have my own tiny distro called Puppy Linux, and I have only just
got usb keyboard and mouse working (latest version 0.8.5).

I also did not know how to auto-detect the keyboard.
I did this:

modprobe usbkbd
modprobe usbmouse
cat /proc/usb/devices | grep "keyboard"

...um, I'm typing this from memory, hope it's right.
If "keyboard" cannot be found, unload those two modules.

For usb mouse, you only need:
modprobe usbmouse

This is only if you have usbkbd and usbmouse turned on and as modules
in the kernel config file.

Regards,
Barry Kauler
www.goosee.com/puppy

Site Timeline