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>
This commit is contained in:
Peter Hutterer
2023-06-15 15:00:54 +10:00
parent a4dfadee2f
commit 94a52a8488

View File

@@ -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;