libinput returns multiple keyboards that do not generate events
Peter Hutterer
peter.hutterer at who-t.net
Thu Jul 17 22:09:36 PDT 2014
On Thu, Jul 17, 2014 at 03:37:41PM +0200, Stefanos A. wrote:
> 2014-07-17 14:57 GMT+02:00 Jasper St. Pierre <jstpierre at mecheye.net>:
>
> > I don't see a benefit for running directly on a Linux console.
> >
> > I don't have any examples of using udev on me at the moment, but Weston
> > should have a few.
> >
>
> Thanks for your help so far.
>
> The benefit applies to applications running on limited hardware such as
> Raspberry Pi; specialized media applications that do not require a desktop
> environment, such as XMBC; and applications that can benefit from tighter
> timing, such as emulators. It's not generally useful, but there is interest
> in making this work.
>
> I am currently reading the documentation on multiseat on freedesktop.org
> <http://www.freedesktop.org/wiki/Software/systemd/multiseat/> and trying to
> understand how that applies to my use case.
>
> "loginctl list-seats" returns a single seat ("seat0") no matter how many I
> keyboards I have connected (internal, internal + external, internal + 2
> external). Same thing happens with mice - it appears that all input devices
> are assigned to seat0 by default.
>
> According to the documentation, "Assignment of hardware devices to seats is
> managed inside the udev database, via settings on the devices." IF I
> understand correctly, this means that only the system administrator can
> change the device-seat assignments. This makes perfect sense in a
> multi-user / multi-seat environment, but I don't think it actually covers
> my use-case which is a single-user system where two people want to play a
> game together for half an hour.
>
> When reading through libinput.h, I see references to "physical seats",
> which I understand to be seat names as seen in loginctl, and "logical
> seats" which sounds very close to the way I am treating input devices
> inside my library. However, although I can retrieve the name of a logical
> seat, I don't see how I would go about assigning devices to logical seats:
> (a) there is not "libinput_assign_device_to_logical_seat" API; (b) even if
> there was, I am back to the original problem, namely how to decide which
> devices to assign to each logical seat.
>
> As far as I can tell, libinput *does* take my use case into account. I
> think what I am missing is a key piece of information on how to make
> everything fit together. I'll check the weston source again, maybe there is
> something hiding there. (Or maybe someone has an idea on how to make this
> work?)
ok, wrote the other email too soon :) the missing piece is: assing the
WL_SEAT tag through udev rules to the devices to split them up.
libinput does not provide dynamic seat reassignment at this point. the
current code is a leftover from weston where IIRC it was used in some
embedded case where the assignment was static. if there's a case for making
this dynamic we can add it, but it's a bit more involved than just a
adding a function - we'd have to trigger the device removed/added functions
as the device changes seats
Cheers,
Peter
More information about the wayland-devel
mailing list