revert keysym back, enigo's Layout can do this

This commit is contained in:
rustdesk
2022-01-09 21:05:00 +08:00
parent a0c704f36e
commit 3f56c82c7b
6 changed files with 10 additions and 45 deletions

View File

@@ -418,8 +418,6 @@ pub enum Key {
Layout(char),
/// raw keycode eg 0x38
Raw(u16),
/// VNC keysym
KeySym(u32),
}
/// Representing an interface and a set of keyboard functions every

View File

@@ -181,9 +181,6 @@ impl MouseControllable for Enigo {
}
}
fn keysequence<'a>(key: Key) -> Cow<'a, str> {
if let Key::KeySym(sym) = key {
return Cow::Owned("".to_owned());
}
if let Key::Layout(c) = key {
return Cow::Owned(format!("U{:X}", c as u32));
}

View File

@@ -426,7 +426,6 @@ impl Enigo {
Key::Raw(raw_keycode) => raw_keycode,
Key::Layout(c) => self.map_key_board(c),
Key::KeySym(sym) => 0 as _,
Key::Super | Key::Command | Key::Windows | Key::Meta => kVK_Command,
_ => 0,

View File

@@ -340,7 +340,6 @@ impl Enigo {
Key::Raw(raw_keycode) => raw_keycode,
Key::Layout(c) => self.get_layoutdependent_keycode(c.to_string()),
Key::Super | Key::Command | Key::Windows | Key::Meta => EVK_LWIN,
Key::KeySym(sym) => 0,
}
}

View File

@@ -173,7 +173,6 @@ message KeyEvent {
uint32 chr = 4;
uint32 unicode = 5;
string seq = 6;
uint32 keysym = 7;
}
repeated ControlKey modifiers = 8;
}