aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/evdev.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 0078881..da6fa3b 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -252,8 +252,15 @@ EvdevReadInput(InputInfoPtr pInfo)
break;
default:
- if (ev.code > BTN_TASK && ev.code < KEY_OK)
+ if (ev.code > BTN_TASK && ev.code < KEY_OK) {
+ /* Some fancy mice with a lot of buttons generate
+ * button events between BTN_TASK and BTN_JOYSTICK */
+ if (ev.code < BTN_JOYSTICK)
+ xf86PostButtonEvent(pInfo->dev, 0,
+ ev.code - BTN_LEFT + 5,
+ value, 0, 0);
break;
+ }
PostKbdEvent(pInfo, &ev, value);
break;