mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-01-19 16:33:01 +08:00
Merge branch 'translate_mode' of github.com:asur4s/rustdesk into translate_mode
This commit is contained in:
commit
8f04c1a780
@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Activate onetime password", ""),
|
("Activate onetime password", ""),
|
||||||
("Set security password", ""),
|
("Set security password", ""),
|
||||||
("Connection not allowed", ""),
|
("Connection not allowed", ""),
|
||||||
|
("Legacy mode", ""),
|
||||||
|
("Map mode", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Activate onetime password", ""),
|
("Activate onetime password", ""),
|
||||||
("Set security password", ""),
|
("Set security password", ""),
|
||||||
("Connection not allowed", ""),
|
("Connection not allowed", ""),
|
||||||
|
("Legacy mode", ""),
|
||||||
|
("Map mode", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Activate onetime password", "Einmal-Passwort aktivieren"),
|
("Activate onetime password", "Einmal-Passwort aktivieren"),
|
||||||
("Set security password", "Sicheres Passwort setzen"),
|
("Set security password", "Sicheres Passwort setzen"),
|
||||||
("Connection not allowed", "Verbindung abgelehnt"),
|
("Connection not allowed", "Verbindung abgelehnt"),
|
||||||
|
("Legacy mode", ""),
|
||||||
|
("Map mode", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Activate onetime password", ""),
|
("Activate onetime password", ""),
|
||||||
("Set security password", ""),
|
("Set security password", ""),
|
||||||
("Connection not allowed", ""),
|
("Connection not allowed", ""),
|
||||||
|
("Legacy mode", ""),
|
||||||
|
("Map mode", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Activate onetime password", ""),
|
("Activate onetime password", ""),
|
||||||
("Set security password", ""),
|
("Set security password", ""),
|
||||||
("Connection not allowed", ""),
|
("Connection not allowed", ""),
|
||||||
|
("Legacy mode", ""),
|
||||||
|
("Map mode", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Activate onetime password", ""),
|
("Activate onetime password", ""),
|
||||||
("Set security password", ""),
|
("Set security password", ""),
|
||||||
("Connection not allowed", ""),
|
("Connection not allowed", ""),
|
||||||
|
("Legacy mode", ""),
|
||||||
|
("Map mode", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Activate onetime password", ""),
|
("Activate onetime password", ""),
|
||||||
("Set security password", ""),
|
("Set security password", ""),
|
||||||
("Connection not allowed", ""),
|
("Connection not allowed", ""),
|
||||||
|
("Legacy mode", ""),
|
||||||
|
("Map mode", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Activate onetime password", ""),
|
("Activate onetime password", ""),
|
||||||
("Set security password", ""),
|
("Set security password", ""),
|
||||||
("Connection not allowed", ""),
|
("Connection not allowed", ""),
|
||||||
|
("Legacy mode", ""),
|
||||||
|
("Map mode", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Activate onetime password", ""),
|
("Activate onetime password", ""),
|
||||||
("Set security password", ""),
|
("Set security password", ""),
|
||||||
("Connection not allowed", ""),
|
("Connection not allowed", ""),
|
||||||
|
("Legacy mode", ""),
|
||||||
|
("Map mode", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Activate onetime password", ""),
|
("Activate onetime password", ""),
|
||||||
("Set security password", ""),
|
("Set security password", ""),
|
||||||
("Connection not allowed", ""),
|
("Connection not allowed", ""),
|
||||||
|
("Legacy mode", ""),
|
||||||
|
("Map mode", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Activate onetime password", "Активировать одноразовый пароль"),
|
("Activate onetime password", "Активировать одноразовый пароль"),
|
||||||
("Set security password", "Задать пароль безопасности"),
|
("Set security password", "Задать пароль безопасности"),
|
||||||
("Connection not allowed", "Подключение не разрешено"),
|
("Connection not allowed", "Подключение не разрешено"),
|
||||||
|
("Legacy mode", ""),
|
||||||
|
("Map mode", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Activate onetime password", ""),
|
("Activate onetime password", ""),
|
||||||
("Set security password", ""),
|
("Set security password", ""),
|
||||||
("Connection not allowed", ""),
|
("Connection not allowed", ""),
|
||||||
|
("Legacy mode", ""),
|
||||||
|
("Map mode", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Activate onetime password", ""),
|
("Activate onetime password", ""),
|
||||||
("Set security password", ""),
|
("Set security password", ""),
|
||||||
("Connection not allowed", ""),
|
("Connection not allowed", ""),
|
||||||
|
("Legacy mode", ""),
|
||||||
|
("Map mode", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Activate onetime password", ""),
|
("Activate onetime password", ""),
|
||||||
("Set security password", ""),
|
("Set security password", ""),
|
||||||
("Connection not allowed", ""),
|
("Connection not allowed", ""),
|
||||||
|
("Legacy mode", ""),
|
||||||
|
("Map mode", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -300,5 +300,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Activate onetime password", "激活一次性訪問功能"),
|
("Activate onetime password", "激活一次性訪問功能"),
|
||||||
("Set security password", "設置安全密碼"),
|
("Set security password", "設置安全密碼"),
|
||||||
("Connection not allowed", "對方不允許連接"),
|
("Connection not allowed", "對方不允許連接"),
|
||||||
|
("Legacy mode", "傳統模式"),
|
||||||
|
("Map mode", "1:1傳輸"),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -615,7 +615,7 @@ fn rdev_key_down_or_up(key: RdevKey, down_or_up: bool) {
|
|||||||
match simulate(&event_type) {
|
match simulate(&event_type) {
|
||||||
Ok(()) => (),
|
Ok(()) => (),
|
||||||
Err(_simulate_error) => {
|
Err(_simulate_error) => {
|
||||||
println!("We could not send {:?}", &event_type);
|
log::error!("Could not send {:?}", &event_type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Let ths OS catchup (at least MacOS)
|
// Let ths OS catchup (at least MacOS)
|
||||||
@ -650,7 +650,7 @@ fn sync_status(evt: &KeyEvent) -> (bool, bool) {
|
|||||||
return (click_capslock, click_numlock);
|
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.
|
// map mode(1): Send keycode according to the peer platform.
|
||||||
let (click_capslock, click_numlock) = sync_status(evt);
|
let (click_capslock, click_numlock) = sync_status(evt);
|
||||||
if click_capslock {
|
if click_capslock {
|
||||||
@ -663,7 +663,7 @@ fn map_keyboard_map(evt: &KeyEvent) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn legacy_keyboard_map(evt: &KeyEvent) {
|
fn legacy_keyboard_mode(evt: &KeyEvent) {
|
||||||
let (click_capslock, click_numlock) = sync_status(evt);
|
let (click_capslock, click_numlock) = sync_status(evt);
|
||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
@ -819,6 +819,7 @@ fn legacy_keyboard_map(evt: &KeyEvent) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fn handle_key_(evt: &KeyEvent) {
|
fn handle_key_(evt: &KeyEvent) {
|
||||||
if EXITING.load(Ordering::SeqCst) {
|
if EXITING.load(Ordering::SeqCst) {
|
||||||
return;
|
return;
|
||||||
@ -826,13 +827,13 @@ fn handle_key_(evt: &KeyEvent) {
|
|||||||
|
|
||||||
match evt.mode.unwrap() {
|
match evt.mode.unwrap() {
|
||||||
KeyboardMode::Legacy => {
|
KeyboardMode::Legacy => {
|
||||||
legacy_keyboard_map(evt);
|
legacy_keyboard_mode(evt);
|
||||||
}
|
}
|
||||||
KeyboardMode::Map => {
|
KeyboardMode::Map => {
|
||||||
map_keyboard_map(evt);
|
map_keyboard_mode(evt);
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
legacy_keyboard_map(evt);
|
legacy_keyboard_mode(evt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user