mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-21 20:20:55 +03:00
windows: impl back and forward mouse buttons
This commit is contained in:
16
src/event.rs
16
src/event.rs
@@ -84,7 +84,21 @@ impl Display for PointerEvent {
|
||||
time: _,
|
||||
button,
|
||||
state,
|
||||
} => write!(f, "button({button}, {state})"),
|
||||
} => {
|
||||
let str = match *button {
|
||||
BTN_LEFT => Some("left"),
|
||||
BTN_RIGHT => Some("right"),
|
||||
BTN_MIDDLE => Some("middle"),
|
||||
BTN_FORWARD => Some("forward"),
|
||||
BTN_BACK => Some("back"),
|
||||
_ => None,
|
||||
};
|
||||
if let Some(button) = str {
|
||||
write!(f, "button({button}, {state})")
|
||||
} else {
|
||||
write!(f, "button({button}, {state}")
|
||||
}
|
||||
}
|
||||
PointerEvent::Axis {
|
||||
time: _,
|
||||
axis,
|
||||
|
||||
Reference in New Issue
Block a user