[PATCH] Treat ALPS mouse buttons as mouse buttons

From: Micheal Marineau
Date: Sun Mar 06 2005 - 19:59:59 EST


The following patch changes the ALPS touchpad driver to treat some mouse
buttons as mouse buttons rather than what appears to be joystick buttons.
This is needed for the Dell Inspiron 8500's DualPoint stick buttons. Without
this patch only the touchpad buttons behave properly.

--- linux-2.6.11/drivers/input/mouse/alps.c 2005-03-01 23:38:13.000000000 -0800
+++ linux-2.6.11-gentoo-r2/drivers/input/mouse/alps.c 2005-03-06 16:45:07.000000000 -0800
@@ -97,8 +97,8 @@

input_report_rel(dev, REL_X, x);
input_report_rel(dev, REL_Y, -y);
- input_report_key(dev, BTN_A, left);
- input_report_key(dev, BTN_B, right);
+ input_report_key(dev, BTN_LEFT, left);
+ input_report_key(dev, BTN_RIGHT, right);
input_sync(dev);
return;
}
@@ -389,8 +389,6 @@
psmouse->dev.evbit[LONG(EV_REL)] |= BIT(EV_REL);
psmouse->dev.relbit[LONG(REL_X)] |= BIT(REL_X);
psmouse->dev.relbit[LONG(REL_Y)] |= BIT(REL_Y);
- psmouse->dev.keybit[LONG(BTN_A)] |= BIT(BTN_A);
- psmouse->dev.keybit[LONG(BTN_B)] |= BIT(BTN_B);

psmouse->dev.evbit[LONG(EV_ABS)] |= BIT(EV_ABS);
input_set_abs_params(&psmouse->dev, ABS_X, 0, 1023, 0, 0);

--
Michael Marineau
marineam@xxxxxxxxxxxxx
Oregon State University

Attachment: signature.asc
Description: OpenPGP digital signature