diff --git a/src/lang/cs.rs b/src/lang/cs.rs index d9ff10416..bb5304aa6 100644 --- a/src/lang/cs.rs +++ b/src/lang/cs.rs @@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Activate onetime password", ""), ("Set security password", ""), ("Connection not allowed", ""), + ("Legacy mode", ""), + ("Map mode", ""), ].iter().cloned().collect(); } diff --git a/src/lang/da.rs b/src/lang/da.rs index f9776e687..4a4310ae0 100644 --- a/src/lang/da.rs +++ b/src/lang/da.rs @@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Activate onetime password", ""), ("Set security password", ""), ("Connection not allowed", ""), + ("Legacy mode", ""), + ("Map mode", ""), ].iter().cloned().collect(); } diff --git a/src/lang/de.rs b/src/lang/de.rs index 671bcae98..c64bdec3d 100644 --- a/src/lang/de.rs +++ b/src/lang/de.rs @@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Activate onetime password", "Einmal-Passwort aktivieren"), ("Set security password", "Sicheres Passwort setzen"), ("Connection not allowed", "Verbindung abgelehnt"), + ("Legacy mode", ""), + ("Map mode", ""), ].iter().cloned().collect(); } diff --git a/src/lang/eo.rs b/src/lang/eo.rs index a21833559..bd4d4bdc0 100644 --- a/src/lang/eo.rs +++ b/src/lang/eo.rs @@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Activate onetime password", ""), ("Set security password", ""), ("Connection not allowed", ""), + ("Legacy mode", ""), + ("Map mode", ""), ].iter().cloned().collect(); } diff --git a/src/lang/es.rs b/src/lang/es.rs index 14ba0ab57..fe627713c 100644 --- a/src/lang/es.rs +++ b/src/lang/es.rs @@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Activate onetime password", ""), ("Set security password", ""), ("Connection not allowed", ""), + ("Legacy mode", ""), + ("Map mode", ""), ].iter().cloned().collect(); } diff --git a/src/lang/fr.rs b/src/lang/fr.rs index f387b550b..1142f85a8 100644 --- a/src/lang/fr.rs +++ b/src/lang/fr.rs @@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Activate onetime password", ""), ("Set security password", ""), ("Connection not allowed", ""), + ("Legacy mode", ""), + ("Map mode", ""), ].iter().cloned().collect(); } diff --git a/src/lang/hu.rs b/src/lang/hu.rs index e35ab8195..b95dce235 100644 --- a/src/lang/hu.rs +++ b/src/lang/hu.rs @@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Activate onetime password", ""), ("Set security password", ""), ("Connection not allowed", ""), + ("Legacy mode", ""), + ("Map mode", ""), ].iter().cloned().collect(); } diff --git a/src/lang/id.rs b/src/lang/id.rs index 6bf69e476..e6fefe77d 100644 --- a/src/lang/id.rs +++ b/src/lang/id.rs @@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Activate onetime password", ""), ("Set security password", ""), ("Connection not allowed", ""), + ("Legacy mode", ""), + ("Map mode", ""), ].iter().cloned().collect(); } diff --git a/src/lang/it.rs b/src/lang/it.rs index 778313d5b..8fa3b77bb 100644 --- a/src/lang/it.rs +++ b/src/lang/it.rs @@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Activate onetime password", ""), ("Set security password", ""), ("Connection not allowed", ""), + ("Legacy mode", ""), + ("Map mode", ""), ].iter().cloned().collect(); } diff --git a/src/lang/ptbr.rs b/src/lang/ptbr.rs index 176833501..5d653550b 100644 --- a/src/lang/ptbr.rs +++ b/src/lang/ptbr.rs @@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Activate onetime password", ""), ("Set security password", ""), ("Connection not allowed", ""), + ("Legacy mode", ""), + ("Map mode", ""), ].iter().cloned().collect(); } diff --git a/src/lang/ru.rs b/src/lang/ru.rs index 55d33c7b3..edb31a7d1 100644 --- a/src/lang/ru.rs +++ b/src/lang/ru.rs @@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Activate onetime password", "Активировать одноразовый пароль"), ("Set security password", "Задать пароль безопасности"), ("Connection not allowed", "Подключение не разрешено"), + ("Legacy mode", ""), + ("Map mode", ""), ].iter().cloned().collect(); } diff --git a/src/lang/sk.rs b/src/lang/sk.rs index 332336007..f31c31d27 100644 --- a/src/lang/sk.rs +++ b/src/lang/sk.rs @@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Activate onetime password", ""), ("Set security password", ""), ("Connection not allowed", ""), + ("Legacy mode", ""), + ("Map mode", ""), ].iter().cloned().collect(); } diff --git a/src/lang/template.rs b/src/lang/template.rs index 7b39a2876..a211ef398 100644 --- a/src/lang/template.rs +++ b/src/lang/template.rs @@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Activate onetime password", ""), ("Set security password", ""), ("Connection not allowed", ""), + ("Legacy mode", ""), + ("Map mode", ""), ].iter().cloned().collect(); } diff --git a/src/lang/tr.rs b/src/lang/tr.rs index 02468201e..f45622c1a 100644 --- a/src/lang/tr.rs +++ b/src/lang/tr.rs @@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Activate onetime password", ""), ("Set security password", ""), ("Connection not allowed", ""), + ("Legacy mode", ""), + ("Map mode", ""), ].iter().cloned().collect(); } diff --git a/src/lang/tw.rs b/src/lang/tw.rs index ea94d159c..0e7d0d573 100644 --- a/src/lang/tw.rs +++ b/src/lang/tw.rs @@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Activate onetime password", "激活一次性訪問功能"), ("Set security password", "設置安全密碼"), ("Connection not allowed", "對方不允許連接"), + ("Legacy mode", "傳統模式"), + ("Map mode", "1:1傳輸"), ].iter().cloned().collect(); } diff --git a/src/server/input_service.rs b/src/server/input_service.rs index d8d4287fc..c350e8d04 100644 --- a/src/server/input_service.rs +++ b/src/server/input_service.rs @@ -615,7 +615,7 @@ fn rdev_key_down_or_up(key: RdevKey, down_or_up: bool) { match simulate(&event_type) { Ok(()) => (), Err(_simulate_error) => { - println!("We could not send {:?}", &event_type); + log::error!("Could not send {:?}", &event_type); } } // Let ths OS catchup (at least MacOS) @@ -650,7 +650,7 @@ fn sync_status(evt: &KeyEvent) -> (bool, bool) { return (click_capslock, click_numlock); } -fn map_keyboard_map(evt: &KeyEvent) { +fn map_keyboard_mode(evt: &KeyEvent) { // map mode(1): Send keycode according to the peer platform. let (click_capslock, click_numlock) = sync_status(evt); if click_capslock { @@ -663,7 +663,7 @@ fn map_keyboard_map(evt: &KeyEvent) { return; } -fn legacy_keyboard_map(evt: &KeyEvent) { +fn legacy_keyboard_mode(evt: &KeyEvent) { let (click_capslock, click_numlock) = sync_status(evt); #[cfg(windows)] @@ -819,6 +819,7 @@ fn legacy_keyboard_map(evt: &KeyEvent) { } } + fn handle_key_(evt: &KeyEvent) { if EXITING.load(Ordering::SeqCst) { return; @@ -826,13 +827,13 @@ fn handle_key_(evt: &KeyEvent) { match evt.mode.unwrap() { KeyboardMode::Legacy => { - legacy_keyboard_map(evt); + legacy_keyboard_mode(evt); } KeyboardMode::Map => { - map_keyboard_map(evt); + map_keyboard_mode(evt); } _ => { - legacy_keyboard_map(evt); + legacy_keyboard_mode(evt); } } }