summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-05-21 13:30:10 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-05-21 15:51:08 +1000
commitdc2191285e799be891787e1f64d10c1cba271240 (patch)
treea5b927da36a4812e77095d736cd6f03f92b23828 /src
parent255b9f6bbf374a315750019c6fadc5f82fb7d41d (diff)
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 <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r--src/evdev.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 6b22a8f..7d30a64 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1805,6 +1805,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: