[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL v2 8/9] input-linux: refine mouse detection

From: Ladi Prosek
Subject: Re: [Qemu-devel] [PULL v2 8/9] input-linux: refine mouse detection
Date: Thu, 14 Apr 2016 09:42:26 +0200

On Wed, Apr 13, 2016 at 5:45 PM, Gerd Hoffmann <address@hidden> wrote:
> Read absolute and relative axis information, only classify
> devices as mouse/tablet in case the x axis is present.

I, too, had to come up with a heuristic to classify input devices in
my guest driver and what I ended up with is different.

For example my Dell keyboard has two endpoints, one with a bunch of
keys and LEDs, so it would be classified as a keyboard. The second one
with special keys (KEY_MUTE, KEY_WWW, KEY_BACK, ..) *and* with a mouse
(REL_X, REL_Y, REL_WHEEL, BTN_LEFT, ...). The reason for this are the
zoom in/out buttons. Pressing them generates Ctrl down on the first
endpoint and mouse wheel up/down on the second one. Releasing them
then translates to Ctrl up. Crazy.

So I wouldn't use exclusive OR when classifying because there are
combo devices out there. Maybe anything with an EV_KEY (minus BTN_*)
would be a keyboard?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]