mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
feat: modifier key
This commit is contained in:
@@ -1072,6 +1072,8 @@ pub fn keycode_to_rdev_key(keycode: u32) -> Key {
|
||||
return rdev::win_key_from_scancode(keycode);
|
||||
#[cfg(any(target_os = "linux"))]
|
||||
return rdev::linux_key_from_code(keycode);
|
||||
#[cfg(any(target_os = "android"))]
|
||||
return rdev::android_key_from_code(keycode);
|
||||
#[cfg(target_os = "macos")]
|
||||
return rdev::macos_key_from_code(keycode.try_into().unwrap_or_default());
|
||||
}
|
||||
|
||||
@@ -1728,11 +1728,7 @@ impl Connection {
|
||||
Some(message::Union::KeyEvent(..)) => {}
|
||||
#[cfg(any(target_os = "android"))]
|
||||
Some(message::Union::KeyEvent(mut me)) => {
|
||||
let is_press = if cfg!(target_os = "linux") {
|
||||
(me.press || me.down) && !crate::is_modifier(&me)
|
||||
} else {
|
||||
me.press
|
||||
};
|
||||
let is_press = (me.press || me.down) && !crate::is_modifier(&me);
|
||||
|
||||
let key = match me.mode.enum_value() {
|
||||
Ok(KeyboardMode::Map) => {
|
||||
@@ -1748,7 +1744,6 @@ impl Connection {
|
||||
_ => None,
|
||||
}
|
||||
.filter(crate::keyboard::is_modifier);
|
||||
log::debug!("key:{:?}", key);
|
||||
|
||||
if let Some(key) = key {
|
||||
if is_press {
|
||||
|
||||
Reference in New Issue
Block a user