mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-01-19 00:13:01 +08:00
This commit is contained in:
parent
f3182a63e9
commit
a2890fa548
@ -135,8 +135,13 @@ class Header: Reactor.Component {
|
||||
return <popup>
|
||||
<menu.context #action-options>
|
||||
<li #transfer-file>Transfer File</li>
|
||||
<li #tunnel>TCP Tunneling</li>
|
||||
<li #tunnel>TCP Tunneling</li>
|
||||
<div .separator />
|
||||
{keyboard_enabled && (pi.platform == "Linux" || pi.sas_enabled) ? <li #ctrl-alt-del>Insert Ctrl + Alt + Del</li> : ""}
|
||||
<li #ctrl-space>Insert Ctrl + Space</li>
|
||||
<li #alt-tab>Insert Alt + Tab</li>
|
||||
{false && <li #super-x>Insert Win/Super + ...</li>}
|
||||
<div .separator />
|
||||
{keyboard_enabled ? <li #lock-screen>Insert Lock</li> : ""}
|
||||
{false && pi.platform == "Windows" ? <li #block-input>Block user input </li> : ""}
|
||||
{handler.support_refresh() ? <li #refresh>Refresh</li> : ""}
|
||||
@ -223,6 +228,18 @@ class Header: Reactor.Component {
|
||||
event click $(#ctrl-alt-del) {
|
||||
handler.ctrl_alt_del();
|
||||
}
|
||||
|
||||
event click $(#alt-tab) {
|
||||
handler.alt_tab();
|
||||
}
|
||||
|
||||
event click $(#ctrl-space) {
|
||||
handler.ctrl_space();
|
||||
}
|
||||
|
||||
event click $(#super-x) {
|
||||
handler.super_x();
|
||||
}
|
||||
|
||||
event click $(#lock-screen) {
|
||||
handler.lock_screen();
|
||||
|
@ -63,6 +63,7 @@ pub struct Handler {
|
||||
id: String,
|
||||
args: Vec<String>,
|
||||
lc: Arc<RwLock<LoginConfigHandler>>,
|
||||
super_on: bool,
|
||||
}
|
||||
|
||||
impl Deref for Handler {
|
||||
@ -153,6 +154,9 @@ impl sciter::EventHandler for Handler {
|
||||
fn send_mouse(i32, i32, i32, bool, bool, bool, bool);
|
||||
fn key_down_or_up(bool, String, i32, bool, bool, bool, bool, bool);
|
||||
fn ctrl_alt_del();
|
||||
fn ctrl_space();
|
||||
fn alt_tab();
|
||||
fn super_x();
|
||||
fn transfer_file();
|
||||
fn tunnel();
|
||||
fn lock_screen();
|
||||
@ -813,6 +817,20 @@ impl Handler {
|
||||
}
|
||||
}
|
||||
|
||||
fn super_x(&mut self) {
|
||||
self.super_on = true;
|
||||
}
|
||||
|
||||
fn ctrl_space(&mut self) {
|
||||
let key = "VK_SPACE".to_owned();
|
||||
self.key_down_or_up(3, key, 0, false, true, false, false, false);
|
||||
}
|
||||
|
||||
fn alt_tab(&mut self) {
|
||||
let key = "VK_TAB".to_owned();
|
||||
self.key_down_or_up(3, key, 0, true, false, false, false, false);
|
||||
}
|
||||
|
||||
fn lock_screen(&mut self) {
|
||||
let lock = "LOCK_SCREEN".to_owned();
|
||||
self.key_down_or_up(1, lock, 0, false, false, false, false, false);
|
||||
@ -860,6 +878,15 @@ impl Handler {
|
||||
extended,
|
||||
);
|
||||
|
||||
let mut command = command;
|
||||
if self.super_on {
|
||||
command = true;
|
||||
}
|
||||
|
||||
if down_or_up == 0 {
|
||||
self.super_on = false;
|
||||
}
|
||||
|
||||
let mut name = name;
|
||||
|
||||
if extended {
|
||||
|
Loading…
Reference in New Issue
Block a user