iced/core/src/mouse/button.rs
bbb651 5802c95797
Make mouse::Button::Other take u16 instead of u8
On wayland keys correspond to <input-event-codes.h>,
and they are past the limit of u8, causing the
back and forward buttons to be 20 and 19 which definitely isn't right
(they should all be around 0x110..=0x117).
2023-05-23 02:35:38 +02:00

15 lines
275 B
Rust

/// The button of a mouse.
#[derive(Debug, Hash, PartialEq, Eq, Clone, Copy)]
pub enum Button {
/// The left mouse button.
Left,
/// The right mouse button.
Right,
/// The middle (wheel) button.
Middle,
/// Some other button.
Other(u16),
}