Detecting the keyboard

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

Mandar Sarpotdar

Reply to
Mandar Sarpotdar
Loading thread data ...

Hi Mandar,

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 SnapGear - A CyberGuard Company --- ph: +61 7 3435 2809 | Custom Embedded Solutions fax: +61 7 3891 3630 | and Security Appliances web:

formatting link
--- Free Embedded Linux Distro at
formatting link
---

Reply to
Damion de Soto

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

formatting link

Reply to
Barry Kauler

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.