diff options
author | Nikolai Kondrashov <spbnick@gmail.com> | 2010-09-07 10:38:20 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2010-09-07 10:38:20 +1000 |
commit | 617a09e298768d0a1d33cb6b367410455489e8b8 (patch) | |
tree | a9ea024f0917d8511e3e8e9714fc34480b474ac7 | |
parent | b83515485b739451b6cde29c7e6f5c900175eaf9 (diff) |
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 <spbnick@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | src/evdev.c | 10 |
1 files changed, 10 insertions, 0 deletions
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) { |