[libinput] How I get extra touch events using libinput?

Peter Hutterer peter.hutterer at who-t.net
Tue Jan 5 23:30:00 PST 2016


CC-ing Andreas this time, forgot about it in my original reply, sorry about
that.

On Wed, Jan 06, 2016 at 03:35:49PM +0900, 강정현 wrote:
> Dear Peter and guys,
> 
> thank you for your information about Andreas Pokorny's patches.
> As I checked them out, most of them seem to make sense to me. :)
>  
> I have more queries. Would you please kindly answer to me?
> 
> 1.
> How can we send the touch pressure/area events via wayland protocol?
> I know this question is something irrelative to libinput. I'd like to get
> your opinion. :)

> Suppose now we have get touch pressure and area events as libinput events
> and in our wayland server is ready to dealing with them.
> When it comes to sending those events (pressure, area) via wayland
> protocol, as we know, we can't send them because there are no arguments
> exist in the current latest version of wl_touch_interface.
> 
> There can be two or more ways to send the events to wayland client(s).
>   - One is extending wayland protocol to have the more arguments.
>   - The other is implementing our own wayland extension protocol for our wayland server and clients.
> Can you tell me which one is more acceptable to you ? :)

I'd go with adding an experimental protocol to wayland-protocols first and
figuring out the details and interactions. Once it looks good enough it can
be merged back into wl_touch if needed.

> 2.
> In Andreas Pokorny patch, only support part of standard linux MT protocols
> except ABS_MT_DISTANCE, ABS_MT_TOOL_TYPE, etc..  Do you have any plan to
> support whole MT protocol events? Or These events are meaningless to
> support via libinput?

do you have hardware that provides these and software that requires them?
git grep shows one device that uses ABS_MT_TOOL_TYPE (pretty sure the wacom
w8001 is a false positive and should be removed). the same device is also
the only one that uses ABS_MT_DISTANCE.

anyway: tool type won't be added as external option. the pen tool would be a
tablet device, and the palm tool probably just discarded.

distance we could talk about. anything else you'll have to bring up and
discuss one-by-one. I don't want to add features just because we can, one of
the things libinput should do is to sanitize the axes and make them sensible
and easy to use from the callers. without knowing what an axis is and how
the devices provide information we can't do that.

> 3.
> How can we deal with the additional MT protocol events in libinput, if our
> kernel support more MT protocol events than the events listed in input.h
> in libinput ?
> Can they be supported ? Do you have any ideas?

you'll need to add them to the kernel first. what types of events are we
talking about here?

Cheers,
   Peter

> > -----Original Message-----
> > From: Peter Hutterer [mailto:peter.hutterer at who-t.net]
> > Sent: Tuesday, January 05, 2016 5:46 PM
> > Cc: wayland-devel at lists.freedesktop.org; sj76.park at samsung.com;
> > duna.oh at samsung.com
> > Subject: Re: [libinput] How I get extra touch events using libinput?
> > 
> > On Tue, Jan 05, 2016 at 05:01:33PM +0900,        wrote:
> > > Hello, guys.
> > > I have a query regarding linux MT protocol event handling in libinput
> > side.
> > > I wanted to get the extra events such as ABS_MT_TOUCH_MAJOR,
> > > ABS_MT_PRESSURE as an event of libinput, but I found that libinput
> > > doesn't handle those events.
> > >
> > > Thus I'd like to know whether there is any plan regarding ABS_MT_XXX
> > > event handling in libinput side.
> > > If there are no plan to support those events, how can I handling those
> > > events?
> > 
> > correct, there is currently no handling of these events, but Andreas
> > Pokorny has a number of patches to add extra axes for touch events. I
> > think this one was the last version:
> > http://lists.freedesktop.org/archives/wayland-devel/2015-
> > November/025415.html
> > and the comments:
> > http://lists.freedesktop.org/archives/wayland-devel/2015-
> > November/025687.html
> > 
> > Cheers,
> >    Peter
> 
> 


More information about the wayland-devel mailing list