mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-12 19:11:51 +00:00
add ctrl+c ctrl+x and esc to mobile terminal ui
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
parent
bc34f140c8
commit
61fb6898c0
2 changed files with 29 additions and 0 deletions
|
@ -21564,6 +21564,7 @@
|
||||||
"zh-cht": "Ctl-C",
|
"zh-cht": "Ctl-C",
|
||||||
"uk": "Ctl-C",
|
"uk": "Ctl-C",
|
||||||
"xloc": [
|
"xloc": [
|
||||||
|
"default-mobile.handlebars->container->page_content->column_l->p10->p10terminal->termTable->termarea4->1->3",
|
||||||
"default.handlebars->container->column_l->p12->termTable->1->1->4->1->3",
|
"default.handlebars->container->column_l->p12->termTable->1->1->4->1->3",
|
||||||
"sharing.handlebars->p12->9->3"
|
"sharing.handlebars->p12->9->3"
|
||||||
]
|
]
|
||||||
|
@ -21594,6 +21595,7 @@
|
||||||
"zh-cht": "Ctl-X",
|
"zh-cht": "Ctl-X",
|
||||||
"uk": "Ctl-X",
|
"uk": "Ctl-X",
|
||||||
"xloc": [
|
"xloc": [
|
||||||
|
"default-mobile.handlebars->container->page_content->column_l->p10->p10terminal->termTable->termarea4->1->3",
|
||||||
"default.handlebars->container->column_l->p12->termTable->1->1->4->1->3",
|
"default.handlebars->container->column_l->p12->termTable->1->1->4->1->3",
|
||||||
"sharing.handlebars->p12->9->3"
|
"sharing.handlebars->p12->9->3"
|
||||||
]
|
]
|
||||||
|
@ -28451,6 +28453,7 @@
|
||||||
"zh-cht": "ESC",
|
"zh-cht": "ESC",
|
||||||
"uk": "ESC",
|
"uk": "ESC",
|
||||||
"xloc": [
|
"xloc": [
|
||||||
|
"default-mobile.handlebars->container->page_content->column_l->p10->p10terminal->termTable->termarea4->1->3",
|
||||||
"default.handlebars->container->column_l->p11->deskarea0->deskarea4->5",
|
"default.handlebars->container->column_l->p11->deskarea0->deskarea4->5",
|
||||||
"default.handlebars->container->column_l->p12->termTable->1->1->4->1->3",
|
"default.handlebars->container->column_l->p12->termTable->1->1->4->1->3",
|
||||||
"sharing.handlebars->p12->9->3"
|
"sharing.handlebars->p12->9->3"
|
||||||
|
|
|
@ -989,6 +989,9 @@
|
||||||
<div class="toright2"></div>
|
<div class="toright2"></div>
|
||||||
<div style="height:28px">
|
<div style="height:28px">
|
||||||
<input id="termActionsBtn" style="margin-left:3px;height:28px" type=button title="Perform power actions on the device" onkeypress="return false" onkeydown="return false" value=Actions onclick=deviceActionFunction() />
|
<input id="termActionsBtn" style="margin-left:3px;height:28px" type=button title="Perform power actions on the device" onkeypress="return false" onkeydown="return false" value=Actions onclick=deviceActionFunction() />
|
||||||
|
<input id="ctrlcbutton" style="margin-left:3px;height:28px" type=button onkeypress="return false" onkeydown="return false" value="Ctl-C" onclick="termSendKey(3,'ctrlcbutton')" />
|
||||||
|
<input id="ctrlxbutton" style="margin-left:3px;height:28px" type=button onkeypress="return false" onkeydown="return false" value="Ctl-X" onclick="termSendKey(24,'ctrlxbutton')" />
|
||||||
|
<input id="escbutton" style="margin-left:3px;height:28px" type=button onkeypress="return false" onkeydown="return false" value="ESC" onclick="termSendKey(27,'escbutton')" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -5148,6 +5151,9 @@
|
||||||
|
|
||||||
// Enable action button if mesh type is not "local devices"
|
// Enable action button if mesh type is not "local devices"
|
||||||
QV('termActionsBtn', terminalNode.mtype != 3);
|
QV('termActionsBtn', terminalNode.mtype != 3);
|
||||||
|
QE('ctrlcbutton', termState);
|
||||||
|
QE('ctrlxbutton', termState);
|
||||||
|
QE('escbutton', termState);
|
||||||
if (((termState == true) && (terminal.contype != 3)) || (terminalNode.agent == null) || (terminalNode.agent.id == 3) || (terminalNode.agent.id == 4)) {
|
if (((termState == true) && (terminal.contype != 3)) || (terminalNode.agent == null) || (terminalNode.agent.id == 3) || (terminalNode.agent.id == 4)) {
|
||||||
QH('terminalCustomUpperRight', '');
|
QH('terminalCustomUpperRight', '');
|
||||||
} else {
|
} else {
|
||||||
|
@ -5467,6 +5473,26 @@
|
||||||
Q('connectbutton2').blur(); // Deselect the connect button so the button does not get key presses.
|
Q('connectbutton2').blur(); // Deselect the connect button so the button does not get key presses.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function termSendKey(key, id) {
|
||||||
|
if (!terminal || xxdialogMode) return;
|
||||||
|
if (xterm != null) {
|
||||||
|
if (terminal.urlname == 'sshterminalrelay.ashx') {
|
||||||
|
// SSH
|
||||||
|
terminal.socket.send('~' + String.fromCharCode(key));
|
||||||
|
} else if (terminal.sendText) {
|
||||||
|
// MeshAgent
|
||||||
|
terminal.sendText(String.fromCharCode(key));
|
||||||
|
} else {
|
||||||
|
// CIRA
|
||||||
|
terminal.send(String.fromCharCode(key));
|
||||||
|
}
|
||||||
|
xterm.focus();
|
||||||
|
} else if (terminal != null) {
|
||||||
|
terminal.m.TermSendKey(key);
|
||||||
|
Q(id).blur(); // Deselect the connect button so the button does not get key presses.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Terminal Shortcut Keys
|
// Terminal Shortcut Keys
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue