]> Pileus Git - ~andy/linux/commitdiff
Input: mousedev - handle mice that use absolute coordinates
authorMicah Parrish <micah.parrish@hp.com>
Thu, 17 Jan 2008 17:01:04 +0000 (12:01 -0500)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 17 Jan 2008 17:01:04 +0000 (12:01 -0500)
Devices like the HP Integrated Remote Console Virtual Mouse, which are
standard equipment on all Proliant and Integrity servers, produce
absolute coordinates instead of relative coordinates.  This is done to
synchronize the position of the mouse cursor on the client desktop
with the mouse cursor position on the server.  Mousedev is not
designed to pass those absolute events directly to X, but it can
translate them into relative movements.  It currently does this for
tablet like devices and touchpads.  This patch merely tells it to also
include a device with ABS_X, ABS_Y, and mouse buttons in its list of
devices to process input for.

This patch enables the mouse pointer to move when using the remote
console.

Signed-off-by: Micah Parrish <micah.parrish@hp.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/mousedev.c

index 78c3ea75da2a056b2799045c6c2329f5834a8705..be83516c776c8566b832c842ee40b7048129e6f1 100644 (file)
@@ -1029,6 +1029,15 @@ static const struct input_device_id mousedev_ids[] = {
                                BIT_MASK(ABS_PRESSURE) |
                                BIT_MASK(ABS_TOOL_WIDTH) },
        },      /* A touchpad */
+       {
+               .flags = INPUT_DEVICE_ID_MATCH_EVBIT |
+                       INPUT_DEVICE_ID_MATCH_KEYBIT |
+                       INPUT_DEVICE_ID_MATCH_ABSBIT,
+               .evbit = { BIT(EV_KEY) | BIT(EV_ABS) | BIT(EV_SYN) },
+               .keybit = { [BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT) },
+               .absbit = { BIT_MASK(ABS_X) | BIT_MASK(ABS_Y) },
+       },      /* Mouse-like device with absolute X and Y but ordinary
+                  clicks, like hp ILO2 High Performance mouse */
 
        { },    /* Terminating entry */
 };