mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-24 22:25:52 -05:00
Added ESC key when in browser full screen.
This commit is contained in:
parent
0f23a343cd
commit
20ca2f7595
@ -387,7 +387,6 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
obj.SendKeyMsgKC = function (action, kc) {
|
obj.SendKeyMsgKC = function (action, kc) {
|
||||||
//console.log('SendKeyMsgKC', action, kc);
|
|
||||||
if (obj.State != 3) return;
|
if (obj.State != 3) return;
|
||||||
if (typeof action == 'object') { for (var i in action) { obj.SendKeyMsgKC(action[i][0], action[i][1]); } }
|
if (typeof action == 'object') { for (var i in action) { obj.SendKeyMsgKC(action[i][0], action[i][1]); } }
|
||||||
else {
|
else {
|
||||||
|
@ -638,6 +638,7 @@
|
|||||||
<option value=12>Win+Right</option>
|
<option value=12>Win+Right</option>
|
||||||
</select>
|
</select>
|
||||||
<input id="DeskWD" type=button value="Send" onkeypress="return false" onkeydown="return false" onclick="deskSendKeys()" />
|
<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="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()" />
|
<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>
|
<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 () {
|
window.onresize = function () {
|
||||||
hideContextMenu();
|
hideContextMenu();
|
||||||
mainUpdate(512);
|
mainUpdate(512);
|
||||||
|
browserfullscreen = isBrowserFullscreen();
|
||||||
|
QV('DeskESC', browserfullscreen);
|
||||||
if ((xtermfit != null) && (xxcurrentView == 12)) { xtermfit.fit(); }
|
if ((xtermfit != null) && (xxcurrentView == 12)) { xtermfit.fit(); }
|
||||||
}
|
}
|
||||||
setTimeout(function() { mainUpdate(512); }, 200);
|
setTimeout(function() { mainUpdate(512); }, 200);
|
||||||
@ -6630,6 +6633,7 @@
|
|||||||
QV('deskFocusBtn', (desktop != null) && (desktop.contype == 2) && (deskState != 0) && (desktopsettings.showfocus));
|
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
|
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('DeskClip', deskState == 3);
|
||||||
|
QE('DeskESC', deskState == 3);
|
||||||
QE('DeskType', deskState == 3);
|
QE('DeskType', deskState == 3);
|
||||||
QV('DeskWD', inputAllowed);
|
QV('DeskWD', inputAllowed);
|
||||||
QE('DeskWD', deskState == 3);
|
QE('DeskWD', deskState == 3);
|
||||||
@ -7110,6 +7114,16 @@
|
|||||||
QS(cv.id)['margin-top'] = '0';
|
QS(cv.id)['margin-top'] = '0';
|
||||||
QS(cv.id)['margin-bottom'] = '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
|
// Remote desktop special key combos for Windows
|
||||||
function deskSendKeys() {
|
function deskSendKeys() {
|
||||||
|
Loading…
Reference in New Issue
Block a user