righ key mapping and fix mac crash

This commit is contained in:
rustdesk
2021-05-26 12:42:21 +08:00
parent d825d30e53
commit 8708fb366a
10 changed files with 128 additions and 11 deletions

View File

@@ -347,7 +347,7 @@ pub enum Key {
///
Clear,
///
Menu,
Menu, // deprecated, use alt instead
///
Pause,
///
@@ -409,6 +409,12 @@ pub enum Key {
///
NumpadEnter,
///
RightShift,
///
RightControl,
///
RightAlt,
///
/// Function, /// mac
/// keyboard layout dependent key
Layout(char),
@@ -485,7 +491,7 @@ impl Enigo {
/// ```
pub fn new() -> Self {
#[cfg(any(target_os = "android", target_os = "ios"))]
return Enigo{};
return Enigo {};
#[cfg(not(any(target_os = "android", target_os = "ios")))]
Self::default()
}