libinput returns multiple keyboards that do not generate events

Jasper St. Pierre jstpierre at mecheye.net
Thu Jul 17 05:39:54 PDT 2014


In that case, yes, the two keyboards should be on different seats. You can
use udev to determine the different seats.

Are you sure you don't want to use Wayland or another protocol where the
compositor will already do all this logic for you?


On Thu, Jul 17, 2014 at 8:38 AM, Stefanos A. <stapostol at gmail.com> wrote:

> 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?
>



-- 
  Jasper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20140717/61153860/attachment-0001.html>


More information about the wayland-devel mailing list