Fix mouse input error #1032

This commit is contained in:
Asura 2022-08-12 19:32:42 +08:00
parent 8310f38c15
commit e7e846cd42

View File

@ -301,6 +301,8 @@ impl Handler {
m.insert(RdevKey::ControlRight, false); m.insert(RdevKey::ControlRight, false);
m.insert(RdevKey::Alt, false); m.insert(RdevKey::Alt, false);
m.insert(RdevKey::AltGr, false); m.insert(RdevKey::AltGr, false);
m.insert(RdevKey::MetaLeft, false);
m.insert(RdevKey::MetaRight, false);
Mutex::new(m) Mutex::new(m)
}; };
} }
@ -816,7 +818,7 @@ impl Handler {
command = true; command = true;
} }
} }
send_mouse(mask, x, y, alt, ctrl, shift, command, self); send_mouse(mask, x, y, alt, ctrl, shift, command, self);
// on macos, ctrl + left button down = right button down, up won't emit, so we need to // on macos, ctrl + left button down = right button down, up won't emit, so we need to
// emit up myself if peer is not macos // emit up myself if peer is not macos
@ -1379,7 +1381,6 @@ impl Handler {
if down_or_up == true { if down_or_up == true {
key_event.down = true; key_event.down = true;
} }
dbg!(&key_event);
self.send_key_event(key_event, KeyboardMode::Legacy) self.send_key_event(key_event, KeyboardMode::Legacy)
} }