From 617a09e298768d0a1d33cb6b367410455489e8b8 Mon Sep 17 00:00:00 2001 From: Nikolai Kondrashov Date: Tue, 7 Sep 2010 10:38:20 +1000 Subject: Add BTN_TOUCH/STYLUS/STYLUS2 support. These three buttons are mapped into buttons 1/2/3, respectively. Overlapping range with BTN_LEFT/MIDDLE/RIGHT, assuming that these ranges don't generally appear in a single device simultaneously. Signed-off-by: Nikolai Kondrashov Signed-off-by: Peter Hutterer --- src/evdev.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/evdev.c b/src/evdev.c index 8b8fe33..910bf5e 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -2254,6 +2254,16 @@ EvdevUtilButtonEventToButtonNumber(EvdevPtr pEvdev, int code) button = (code - BTN_LEFT + 5); break; + case BTN_TOUCH: + button = 1; + break; + case BTN_STYLUS: + button = 2; + break; + case BTN_STYLUS2: + button = 3; + break; + default: if ((code > BTN_TASK) && (code < KEY_OK)) { if (code < BTN_JOYSTICK) { -- cgit v1.2.3