libinput returns multiple keyboards that do not generate events

Peter Hutterer peter.hutterer at who-t.net
Thu Jul 17 22:01:54 PDT 2014


On Thu, Jul 17, 2014 at 02:43:59PM +0200, Stefanos A. wrote:
> 2014-07-17 14:39 GMT+02:00 Jasper St. Pierre <jstpierre at mecheye.net>:
> 
> > In that case, yes, the two keyboards should be on different seats. You can
> > use udev to determine the different seats.
> >
> 
> Is there any documentation for this? Every sample I have been able to find
> so far creates a single seat.

a libinput context only works for a single seat at a time, so if you assign
the devices different seats, you need multiple libinput contexts. That is
for physical seats (ID_SEAT, systemd seats, read "these devices are
really not supposed to be together).

libinput also provides a logical seat ("WL_SEAT") which is for the
multi-pointer case where the devices are on the same physical seat but you
want them independently (separate cursors/keyboard foci).

I suspect in your case you want the latter case, so just create a single
libinput context for the physical seat, then just look at
libinput_device_get_seat() to determine which device belongs to which
logical seat.

Cheers,
   Peter



More information about the wayland-devel mailing list