diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2023-06-15 15:00:54 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2023-06-15 15:09:31 +1000 |
commit | 94a52a848801ff035ec4d1c604dac7c90708e562 (patch) | |
tree | 701374fb8fd7668c9d184eb0d75ea58537e638bd | |
parent | a4dfadee2ff9a53aaeaed1b18404138fcf7fdaca (diff) |
tablet: map BTN_STYLUS3 to button 8
Buttons 4-7 are out of bounds for hysterical historical reasons.
Previously this button fell through to the default statement and
resulted in 8 + BTN_STYLUS3 - BTN_SIDE == 65 which is rather obviously
wrong.
Instead, map it explicitly to what the fourth button would be mapped to
on other devices. This will now overlap with BTN_SIDE on devices that
both BTN_STYLUS3 *and* BTN_SIDE but those devices don't appear to exist
in the real world.
Fixes #50
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | src/xf86libinput.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/xf86libinput.c b/src/xf86libinput.c index b2ae804..b811ce0 100644 --- a/src/xf86libinput.c +++ b/src/xf86libinput.c @@ -256,6 +256,7 @@ btn_linux2xorg(unsigned int b) /* tablet button range */ case BTN_STYLUS: button = 2; break; case BTN_STYLUS2: button = 3; break; + case BTN_STYLUS3: button = 8; break; default: button = 8 + b - BTN_SIDE; break; |