fix unexpected repeating key input on remote linux https://github.com/rustdesk/rustdesk/issues/189

This commit is contained in:
rustdesk
2021-08-06 14:23:50 +08:00
parent 9d7dced7e7
commit 3200002e52
2 changed files with 4 additions and 28 deletions

View File

@@ -644,7 +644,10 @@ impl Connection {
}
Some(message::Union::key_event(mut me)) => {
if self.keyboard {
if me.press {
// handle all down as press
// fix unexpected repeating key on remote linux, seems also fix abnormal alt/shift, which
// make sure all key are released
if me.press || me.down {
if let Some(key_event::Union::unicode(_)) = me.union {
handle_key(&me);
} else if let Some(key_event::Union::seq(_)) = me.union {