mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
mouse forward back support on windows
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -104,6 +104,10 @@ pub enum MouseButton {
|
||||
Middle,
|
||||
/// Right mouse button
|
||||
Right,
|
||||
/// Back mouse button
|
||||
Back,
|
||||
/// Forward mouse button
|
||||
Forward,
|
||||
|
||||
/// Scroll up button
|
||||
ScrollUp,
|
||||
|
||||
@@ -134,9 +134,15 @@ impl MouseControllable for Enigo {
|
||||
MouseButton::Left => MOUSEEVENTF_LEFTDOWN,
|
||||
MouseButton::Middle => MOUSEEVENTF_MIDDLEDOWN,
|
||||
MouseButton::Right => MOUSEEVENTF_RIGHTDOWN,
|
||||
MouseButton::Back => MOUSEEVENTF_XDOWN,
|
||||
MouseButton::Forward => MOUSEEVENTF_XDOWN,
|
||||
_ => unimplemented!(),
|
||||
},
|
||||
0,
|
||||
match button {
|
||||
MouseButton::Back => XBUTTON1 as _,
|
||||
MouseButton::Forward => XBUTTON2 as _,
|
||||
_ => 0,
|
||||
},
|
||||
0,
|
||||
0,
|
||||
);
|
||||
@@ -155,9 +161,15 @@ impl MouseControllable for Enigo {
|
||||
MouseButton::Left => MOUSEEVENTF_LEFTUP,
|
||||
MouseButton::Middle => MOUSEEVENTF_MIDDLEUP,
|
||||
MouseButton::Right => MOUSEEVENTF_RIGHTUP,
|
||||
MouseButton::Back => MOUSEEVENTF_XUP,
|
||||
MouseButton::Forward => MOUSEEVENTF_XUP,
|
||||
_ => unimplemented!(),
|
||||
},
|
||||
0,
|
||||
match button {
|
||||
MouseButton::Back => XBUTTON1 as _,
|
||||
MouseButton::Forward => XBUTTON2 as _,
|
||||
_ => 0,
|
||||
},
|
||||
0,
|
||||
0,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user