Keyboard component containing only Sleep button

Hello again, sorry to post another stupid question, however, I can’t find a way around this… I have a Component representing my keyboard, and every 20 milliseconds I poll it, get all of it’s components, and display their name. Problem is, the only component ever to appear is my sleep button? What should I do?

Lots of thanks,
laginimaineb.

Me again… I just checked the test that came with the lastest version bundle and to my surprise it shows that I have 5 devices; two keyboards which only contain my Power and Sleep buttons, one real keyboard, one real mouse, and one “fake” mouse which only says : “Macintosh Mouse Emulation”. Why is that so? I only have a normal mouse and keyboard (non-USB). How should I be able to select the “real” keyboard programmatically without asking the user to manually pick the device with the most buttons?

With thanks,
laginimaineb.

The extra devices, with just a few, non standard buttons is a ‘delight’ of the way the things are exposed in linux, one of them is the sleep button on your PC base i think (or support for it). Hit the power button on you ATX case and see it change (never tried it myself though). Some might be part of your keyboard, but I can’t prove at run time, which actual piece of hardware they belong to, so I don’t do anything clever, I just present what the udev offers me.

The mac emulation mouse is an optional kernel support for emulating more than 1 button on a single button mac mouse. It’s up the the maintainers of your distribution to enable or disable that support in the kernel, or you can if you want to compile your own. It’s a virtual device. It makes life interesting, but there is not alot I can do about it. I’m certainly not going to ignore it, because someone out there might want to use it :).

HTH

Endolf