From 4efe0d272ed6ef7bda4cc005ad6033f2b1916fdc Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 21 May 2009 13:30:10 +1000 Subject: Deal with BTN_3 to BTN_9 buttons. These buttons were previously mapped to 0, i.e. inactive. This patch slightly improves things in that the buttons are now mapped to 8+. Devices that have both BTN_3 and BTN_SIDE (or a similar pair in that sequence) have both mapped to the same button number though. Devices that have BTN_LEFT, BTN_0, BTN_3 and BTN_SIDE have the last three mapped to 8 (and their followers have double-mappings too). We'll fix that once we actually see devices affected by this. Signed-off-by: Peter Hutterer (cherry picked from commit dc2191285e799be891787e1f64d10c1cba271240) --- src/evdev.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/evdev.c b/src/evdev.c index b880c6a..3a9fb0e 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1767,6 +1767,17 @@ EvdevUtilButtonEventToButtonNumber(EvdevPtr pEvdev, int code) button = (TestBit(BTN_RIGHT, pEvdev->key_bitmask)) ? 10 : 3; break; + /* FIXME: BTN_3.. and BTN_SIDE.. have the same button mapping */ + case BTN_3: + case BTN_4: + case BTN_5: + case BTN_6: + case BTN_7: + case BTN_8: + case BTN_9: + button = (code - BTN_0 + 5); + break; + case BTN_SIDE: case BTN_EXTRA: case BTN_FORWARD: -- cgit v1.2.3