mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added support for remote desktop cursors.
This commit is contained in:
parent
296f06db4b
commit
364e3fa631
3 changed files with 12 additions and 3 deletions
|
@ -57,6 +57,8 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
|
|||
obj.onDisplayinfo = null;
|
||||
obj.accumulator = null;
|
||||
|
||||
var mouseCursors = ['default', 'progress', 'crosshair', 'pointer', 'help', 'text', 'no-drop', 'move', 'nesw-resize', 'ns-resize', 'nwse-resize', 'w-resize', 'alias', 'wait', 'none'];
|
||||
|
||||
obj.Start = function () {
|
||||
obj.State = 0;
|
||||
obj.accumulator = null;
|
||||
|
@ -213,7 +215,7 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
|
|||
jumboAdd = 8;
|
||||
}
|
||||
if ((cmdsize != str.length) && (obj.debugmode > 0)) { console.log(cmdsize, str.length, cmdsize == str.length); }
|
||||
if ((command >= 18) && (command != 65)) { console.error("Invalid KVM command " + command + " of size " + cmdsize); console.log("Invalid KVM data", str.length, rstr2hex(str.substring(0, 40)) + '...'); return; }
|
||||
if ((command >= 18) && (command != 65) && (command != 88)) { console.error("Invalid KVM command " + command + " of size " + cmdsize); console.log("Invalid KVM data", str.length, rstr2hex(str.substring(0, 40)) + '...'); return; }
|
||||
if (cmdsize > str.length) {
|
||||
//console.log('KVM accumulator set to ' + str.length + ' bytes, need ' + cmdsize + ' bytes.');
|
||||
obj.accumulator = str;
|
||||
|
@ -296,6 +298,12 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
|
|||
console.log('KVM: ' + str.substring(1));
|
||||
}
|
||||
break;
|
||||
case 88: // MNG_KVM_MOUSE_CURSOR
|
||||
if (cmdsize != 5) break;
|
||||
var cursorNum = str.charCodeAt(4);
|
||||
if (cursorNum > mouseCursors.length) { cursorNum = 0; }
|
||||
obj.CanvasId.style.cursor = mouseCursors[cursorNum];
|
||||
break;
|
||||
}
|
||||
return cmdsize + jumboAdd;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue