libinput returns multiple keyboards that do not generate events

Stefanos A. stapostol at gmail.com
Thu Jul 17 05:38:13 PDT 2014


2014-07-17 14:20 GMT+02:00 Jasper St. Pierre <jstpierre at mecheye.net>:

> Why do you need to know which one is the "real" keyboard? Just listen to
> events from all of them. On my laptop, I also have six keyboards. They are:
>
>      Power Button
>     Video Bus
>     Sleep Button
>     Integrated Camera
>     AT Translated Set 2 keyboard (this is the actual "keyboard" keyboard)
>     ThinkPad Extra Buttons
>
> All of these are real keyboard devices that will send keyboard events if
> you try hard enough. If you get multiple keyboard devices on the same seat,
> you should treat all of them as equally valid and group them together into
> one virtual keyboard. Same thing with pointer devices.
>

Why would the Video Bus and Integrated Camera be detected as a keyboard in
the first place? Is this really the intended meaning for
LIBINPUT_DEVICE_CAP_KEYBOARD? It may be a matter of semantics, but I would
expect Integrated Camera to provide events under a separate cap, such as
LIBINPUT_DEVICE_CAP_GENERIC.

For my use case, I need to be able to connect multiple keyboards and
receive input from them independently. For example, in a two player co-op
game, each player should be able to use his own keyboard to control his
character.

Without knowing whether a given device is a "real" keyboard, how can I
distinguish between e.g. the internal laptop keyboard and an external
keyboard connected via USB? Do I need to create multiple seats? If so, how
would I know how many seats to create, given that I don't know how many
keyboards are there in the first place?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20140717/e750192b/attachment.html>


More information about the wayland-devel mailing list