[PATCH 02/11] Add libinput_device_has_key function

Peter Hutterer peter.hutterer at who-t.net
Thu Nov 6 17:54:33 PST 2014


On Thu, Nov 06, 2014 at 05:46:26PM -0800, Bill Spitzak wrote:
> 
> 
> On 11/06/2014 05:17 PM, Peter Hutterer wrote:
> >On Thu, Nov 06, 2014 at 11:41:20AM -0800, Bill Spitzak wrote:
> >>It sure seems like an api that returned a list of all the keycodes the
> >>device has would be better. It looks like the client has to try every
> >>possible keycode to find out what exists with this.
> >
> >what is the caller (which is not a wl client!) going to do with the list?
> 
> I'm mostly concerned that the api seems to be vastly different than the api
> for keyboards, even though both devices have multiple buttons.

what API for keyboards?

> I also have some doubts that devices are going to nicely use the desired
> single keycode for this function, 

I'm not sure what you mean here. If devices use the wrong keycode, that's
generally a kernel bug, in some exceptions we can work around it in
libinput (e.g. tablets).

> and thus libinput users are going to be
> forced to try a whole set of keycodes to find the one that works.

isn't that the nature of an API that lets you figure out if a device
supports a specific button?

Cheers,
   Peter


More information about the wayland-devel mailing list