mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-26 07:05:52 -05:00
Added ESC key when in browser full screen.
This commit is contained in:
parent
0a0b5e9328
commit
0ba4da3960
@ -387,7 +387,6 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
|
||||
}
|
||||
|
||||
obj.SendKeyMsgKC = function (action, kc) {
|
||||
//console.log('SendKeyMsgKC', action, kc);
|
||||
if (obj.State != 3) return;
|
||||
if (typeof action == 'object') { for (var i in action) { obj.SendKeyMsgKC(action[i][0], action[i][1]); } }
|
||||
else {
|
||||
|
@ -638,6 +638,7 @@
|
||||
<option value=12>Win+Right</option>
|
||||
</select>
|
||||
<input id="DeskWD" type=button value="Send" onkeypress="return false" onkeydown="return false" onclick="deskSendKeys()" />
|
||||
<input id="DeskESC" style="display:none" type="button" value="ESC" onkeypress="return false" onkeydown="return false" onclick="sendDeskEsc()" />
|
||||
<input id="DeskClip" style="" type="button" value="Clipboard" onkeypress="return false" onkeydown="return false" onclick="showDeskClip()" />
|
||||
<input id="DeskType" style="" type="button" value="Type" onkeypress="return false" onkeydown="return false" onclick="showDeskType()" />
|
||||
<label><span id="DeskControlSpan" title="Toggle mouse and keyboard input"><input id="DeskControl" type="checkbox" onkeypress="return false" onkeydown="return false" onclick="toggleKvmControl()" />Input</span></label>
|
||||
@ -1381,6 +1382,8 @@
|
||||
window.onresize = function () {
|
||||
hideContextMenu();
|
||||
mainUpdate(512);
|
||||
browserfullscreen = isBrowserFullscreen();
|
||||
QV('DeskESC', browserfullscreen);
|
||||
if ((xtermfit != null) && (xxcurrentView == 12)) { xtermfit.fit(); }
|
||||
}
|
||||
setTimeout(function() { mainUpdate(512); }, 200);
|
||||
@ -6630,6 +6633,7 @@
|
||||
QV('deskFocusBtn', (desktop != null) && (desktop.contype == 2) && (deskState != 0) && (desktopsettings.showfocus));
|
||||
QV('DeskClip', (currentNode.agent) && (currentNode.agent.id != 11) && (currentNode.agent.id != 16) && ((desktop == null) || (desktop.contype != 2))); // Clipboard not supported on macOS
|
||||
QE('DeskClip', deskState == 3);
|
||||
QE('DeskESC', deskState == 3);
|
||||
QE('DeskType', deskState == 3);
|
||||
QV('DeskWD', inputAllowed);
|
||||
QE('DeskWD', deskState == 3);
|
||||
@ -7110,6 +7114,16 @@
|
||||
QS(cv.id)['margin-top'] = '0';
|
||||
QS(cv.id)['margin-bottom'] = '0';
|
||||
}
|
||||
|
||||
// Press ESC key
|
||||
function sendDeskEsc() {
|
||||
if (desktop == null || desktop.State != 3) return;
|
||||
if (desktop.contype == 2) {
|
||||
desktop.m.sendkey([[65307,1],[65307,0]]); // Intel AMT: ESC down, ESC release
|
||||
} else {
|
||||
desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,27], [desktop.m.KeyAction.EXUP,27]]); // MeshAgent: ESC press, ESC release
|
||||
}
|
||||
}
|
||||
|
||||
// Remote desktop special key combos for Windows
|
||||
function deskSendKeys() {
|
||||
|
Loading…
Reference in New Issue
Block a user