Keyboard detection and a test request

Ivan Čukić ivan.cukic at kde.org
Fri Jun 21 10:01:26 UTC 2013


Hi all,

I (think) I'm now properly detecting regular mice, touch-pads and touch-
screens, based on some X properties of those.

It would be very nice if people with touch-screens and touch-pads would do the 
following test - run xinput on your device (if not installed, you can ssh -X 
to a machine that has xinput)

Take the id of the touch* device, and do this (replace 4 with an actual id)
xinput list-props 4

Post the output to pastebin and send me the output (if I pong you back on IRC, 
you send me the link there)

--

The keyboard is a problem.

X always reports a keyboard present - the 'AT Translated Set 2 keyboard' 
device. The second thing is that it has no properties to distinguish a real 
keyboard from special button-keyboard devices like 'Sleep Button' etc.

The approach that I am considering is the following - have a platform config 
(following the current approach we have in PA) file that will say whether the 
device has a keyboard by default. This will tell me whether the 'AT Transl...' 
is a real keyboard or not.

The second step is ugly and a hopefully working heuristic that makes me laugh 
- if the name of the device contains the word 'Keyboard', then it is a 
keyboard. Otherwise, we'll need some kind of whitelist/blacklist system.

It could probably be done via libusb or similar, by detecting whether 
something has Keyboard bInterfaceProtocol, but then again, a usb numpad would 
also (I guess, don't have one of those) use the same protocol.

Cheerio,
Ivan



-- 
You know, there are many people in the country today who,
through no fault of their own, are sane. Some of them were born sane.
Some of them became sane later in their lives...
  -- Monty Python's Flying Circus



More information about the Plasma-devel mailing list