mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added server-side remote user input lock support
This commit is contained in:
parent
ab538b086f
commit
811611ab7a
8 changed files with 1685 additions and 1615 deletions
BIN
public/images/icon-keylock-red.png
Normal file
BIN
public/images/icon-keylock-red.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 351 B |
BIN
public/images/icon-keylock.png
Normal file
BIN
public/images/icon-keylock.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 361 B |
2
public/scripts/agent-desktop-0.0.2-min.js
vendored
2
public/scripts/agent-desktop-0.0.2-min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -47,6 +47,10 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
|
|||
obj.SwapMouse = false;
|
||||
obj.FirstDraw = false;
|
||||
|
||||
// Remote user mouse and keyboard lock
|
||||
obj.onRemoteInputLockChanged = null;
|
||||
obj.RemoteInputLock = null;
|
||||
|
||||
obj.ScreenWidth = 960;
|
||||
obj.ScreenHeight = 701;
|
||||
obj.width = 960;
|
||||
|
@ -193,6 +197,7 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
|
|||
while (obj.PendingOperations.length > 0) { obj.PendingOperations.shift(); }
|
||||
obj.SendCompressionLevel(1);
|
||||
obj.SendUnPause();
|
||||
obj.SendRemoteInputLock(2); // Query input lock state
|
||||
// No need to event the display size change now, it will be evented on first draw.
|
||||
if (obj.onScreenSizeChange != null) { obj.onScreenSizeChange(obj, obj.ScreenWidth, obj.ScreenHeight, obj.CanvasId); }
|
||||
}
|
||||
|
@ -266,6 +271,13 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
|
|||
console.log('KVM: ' + str.substring(1));
|
||||
}
|
||||
break;
|
||||
case 87: // MNG_KVM_INPUT_LOCK
|
||||
if (cmdsize != 5) break;
|
||||
if (obj.RemoteInputLock != (view[4] != 0)) {
|
||||
obj.RemoteInputLock = (view[4] != 0);
|
||||
if (obj.onRemoteInputLockChanged) { obj.onRemoteInputLockChanged(obj, obj.RemoteInputLock); }
|
||||
}
|
||||
break;
|
||||
case 88: // MNG_KVM_MOUSE_CURSOR
|
||||
if ((cmdsize != 5) || (obj.stopInput)) break;
|
||||
var cursorNum = view[4];
|
||||
|
@ -385,6 +397,9 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
|
|||
}
|
||||
}
|
||||
|
||||
// Send remote input lock. 0 = Unlock, 1 = Lock, 2 = Query
|
||||
obj.SendRemoteInputLock = function (code) { obj.send(String.fromCharCode(0x00, obj.InputType.KEYUNICODE, 0x00, 0x05, code)); }
|
||||
|
||||
obj.SendMessage = function (msg) {
|
||||
if (obj.State == 3) obj.send(String.fromCharCode(0x00, 0x11) + obj.shortToStr(4 + msg.length) + msg); // 0x11 = 17 MNG_KVM_MESSAGE
|
||||
}
|
||||
|
|
|
@ -2625,7 +2625,7 @@ a {
|
|||
-ms-grid-row: 4;
|
||||
}
|
||||
|
||||
#DeskChatButton, #DeskNotifyButton, #DeskOpenWebButton, #DeskBackgroundButton, #DeskSaveImageButton, #DeskRecordButton, #DeskClipboardInButton, #DeskClipboardOutButton, #DeskRefreshButton, #DeskLockButton {
|
||||
#DeskChatButton, #DeskNotifyButton, #DeskOpenWebButton, #DeskBackgroundButton, #DeskSaveImageButton, #DeskRecordButton, #DeskClipboardInButton, #DeskClipboardOutButton, #DeskRefreshButton, #DeskLockButton, #DeskInputLockedButton, #DeskInputUnLockedButton {
|
||||
float: right;
|
||||
margin-top: 1px;
|
||||
margin-right: 4px;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue