evden and horizontal wheel
Ander Conselvan de Oliveira
ander at c3sl.ufpr.br
Mon Oct 6 09:50:22 PDT 2008
Em Monday 06 October 2008 13:23:48 Dan Nicholson escreveu:
> On Mon, Oct 6, 2008 at 7:41 AM, Ander Conselvan de Oliveira
>
> <ander at c3sl.ufpr.br> wrote:
> > Hello,
> >
> > I have a user reporting his horizontal wheel is inverted using the evdev
> > input driver. If I understand correctly, evdev handles positive values as
> > "to the right" and negative as "to the left":
> >
> > case REL_HWHEEL:
> > if (value > 0)
> > PostButtonClicks(pInfo, wheel_right_button, value);
> > if (value < 0)
> > PostButtonClicks(pInfo, wheel_left_button, -value);
> > break;
> >
> > But the, somewhat recent, kernel commit
> > 740f370dc61dc478d891d7d47660bb3ae39ddb4f, by Dan Nicholson states:
> >
> > "Some Logitech mice have a tilt wheel which register as HWHEEL buttons.
> > The events are positive for a click to the right and negative for a click
> > to the left. Applications expect the opposite, though."
> >
> > Since I have no mice with horizontal scroll wheels, I have no idea what
> > is the correct way to handle this.
>
> This should definitely be fixed at the kernel level instead of hacking
> around it in userspace. What kind of mouse does he have?
His mouse is a Logitech V150.
> The above commit message a wrote was simply the behavior I noticed,
> and I don't know authoritatively what value applications expect. I do
> know my mice work correctly with recent kernel (with above commit) and
> recent xf86-input-evdev. A good way to test what the kernel is
> outputting without X getting in the way is evtest, which google will
> point you to, but I used the one from the linux-input CVS:
The kernel seems to output the correct values (he's using a kernel with the
above commit) [0]. The way I see it, this should not work with the current
evdev driver, since wheel_right_button clicks are posted when the value
reported by the kernel is positive.
[0] https://qa.mandriva.com/show_bug.cgi?id=44309#c19
--
Ander
More information about the xorg
mailing list