1
0
Fork 0

Map mouse forward and back correctly on X11

Buttons 6 and 7 are for horizontal scrolling, just like buttons 4 and 5
are for vertical scrolling. I couldn't find a list of button numbers in
the X11 protocol specs, but this is what the buttons are bound to on my
Logitech G502 and
http://xahlee.info/linux/linux_x11_mouse_button_number.html also
confirms this.
This commit is contained in:
Robbert van der Helm 2022-11-22 15:32:43 +01:00
parent 84f10763a3
commit 025f34b80f

View file

@ -684,8 +684,8 @@ fn mouse_id(id: u8) -> MouseButton {
1 => MouseButton::Left, 1 => MouseButton::Left,
2 => MouseButton::Middle, 2 => MouseButton::Middle,
3 => MouseButton::Right, 3 => MouseButton::Right,
6 => MouseButton::Back, 8 => MouseButton::Back,
7 => MouseButton::Forward, 9 => MouseButton::Forward,
id => MouseButton::Other(id), id => MouseButton::Other(id),
} }
} }