[Wayland, libinput] Question about libinput

Peter Hutterer peter.hutterer at who-t.net
Thu Mar 19 14:15:57 PDT 2015


On Thu, Mar 19, 2015 at 09:44:39PM +0900, Beomho Seo wrote:
> On 03/19/2015 07:25 PM, Peter Hutterer wrote:
> > On Thu, Mar 19, 2015 at 02:29:05PM +0900, Beomho Seo wrote:
> >> On 03/12/2015 06:28 AM, Peter Hutterer wrote:
> >>> On Wed, Mar 11, 2015 at 05:01:32PM +0900, Beomho Seo wrote:
> >>>> Hi everyone,
> >>>>
> >>>> I have a question about libinput.
> >>>>
> >>>> I will handle a rotary input device. It is able to provide angular information
> >>>> (increase, decrease), elocity and push/relase(like key) event. I hope to use
> >>>> libinput to handle rotary event.
> >>>>
> >>>> Would you give me some advice?
> >>>
> >>> best to file a bug and attach an evemu-describe output of the device, or
> >>> even better an example event recording with evemu-record. That allows us to
> >>> emulate the device and look at how we can support it.
> >>>
> >>> Cheers,
> >>>    Peter
> >>>
> >>
> >> Thank you for your comment.
> >> I tried to use evemu but unfortunately I could not.
> >> So I use evtest instead of evemu on my board.
> >> Test log below,
> >>
> >> sh-3.2# ./evtest /dev/input/event0
> >> Input driver version is 1.0.1
> >> Input device ID: bus 0x18 vendor 0x1 product 0x1 version 0x100
> >> Input device name: "rotary"
> >> Supported events:
> >>   Event type 0 (Sync)
> >>   Event type 2 (Relative)
> >>     Event code 0 (X)
> >> Testing ... (interrupt to exit)
> >> Event: time 1357175592.602014, type 2 (Relative), code 0 (X), value 3
> >> Event: time 1357175592.602052, -------------- Report Sync ------------
> >> Event: time 1357175592.611640, type 2 (Relative), code 0 (X), value 2
> >> Event: time 1357175592.611683, -------------- Report Sync ------------
> >> Event: time 1357175592.621824, type 2 (Relative), code 0 (X), value 2
> >> Event: time 1357175592.621884, -------------- Report Sync ------------
> >> Event: time 1357175592.669391, type 2 (Relative), code 0 (X), value -1
> >> Event: time 1357175592.669436, -------------- Report Sync ------------
> >> Event: time 1357175592.676849, type 2 (Relative), code 0 (X), value -1
> >> Event: time 1357175592.676887, -------------- Report Sync ------------
> >> Event: time 1357175592.686479, type 2 (Relative), code 0 (X), value -1
> >> Event: time 1357175592.686515, -------------- Report Sync ------------
> >> [...]
> >>
> >> This device driver provide relevant axis information.
> >> Value data since last polling was done.
> >> I want to know libinput how to control these data.
> > 
> > libinput doesn't handle devices like this yet, but it will, eventually. see
> > the buttonset interface patch that I sent to the list yesterday, that's
> > pretty much designed to handle this stuff.
> > 
> 
> OK, I will check buttonset interface patch.
> 
> > fwiw, judging by the evtest output this device only sends one coordinate (X,
> > for some reason, which is probably something that should be quirked in the
> > kernel to REL_DIAL). no buttons or anything else, unless you cut the evtest output
> > short.
> > 
> 
> Yes, This driver have no key, no button. This device move like handle or motor.
> Some rotary device driver report REL_X event type too.

fwiw, that's in contrast with what you wrote originally:
> >>>> I will handle a rotary input device. It is able to provide angular information
> >>>> (increase, decrease), elocity and push/relase(like key) event. I hope to use
> >>>> libinput to handle rotary event.

which tbh looked like a griffin powermate. either way, are you
writing/handling the kernel driver? If so, it'd be good to switch to
REL_DIAL. REL_X for a rotary axis doesn't make sense unless it's part of a
digital etch-a-sketch....

Cheers,
   Peter


More information about the wayland-devel mailing list