mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-03-24 18:04:00 +00:00
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>
(cherry picked from commit dc2191285e)
This commit is contained in:
11
src/evdev.c
11
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:
|
||||
|
||||
Reference in New Issue
Block a user