Merge pull request #2781 from fufesou/master

fix win scancode filter, ignore 0xE0..
This commit is contained in:
RustDesk 2023-01-10 11:12:50 +08:00 committed by GitHub
commit 6c2c5d9639
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -617,7 +617,8 @@ pub fn map_keyboard_mode(event: &Event, mut key_event: KeyEvent) -> Option<KeyEv
let keycode = match peer.as_str() {
"windows" => {
// https://github.com/rustdesk/rustdesk/issues/1371
if event.scan_code > 255 {
// Filter scancodes that are greater than 255 and the hight word is not 0xE0.
if event.scan_code > 255 && (event.scan_code >> 8) != 0xE0 {
return None;
}
event.scan_code