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).
15 lines
275 B
Rust
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),
|
|
}
|