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:
parent
84f10763a3
commit
025f34b80f
|
@ -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),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue