From 6b19e2f818d1839e2d469dc6cdac0d94d5e76c0b Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Mon, 28 Feb 2022 20:14:56 -0800 Subject: [PATCH] Make it so &debug=1 does not automatically send unicode keys in remote desktop. --- public/scripts/agent-desktop-0.0.2.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/scripts/agent-desktop-0.0.2.js b/public/scripts/agent-desktop-0.0.2.js index 87fe02fe..c498ab9e 100644 --- a/public/scripts/agent-desktop-0.0.2.js +++ b/public/scripts/agent-desktop-0.0.2.js @@ -580,7 +580,7 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) { obj.xxMouseWheel = function (e) { if (obj.State == 3) { obj.SendMouseMsg(obj.KeyAction.SCROLL, e); return false; } return true; } obj.xxKeyUp = function (e) { if ((e.key != 'Dead') && (obj.State == 3)) { - if ((typeof e.key == 'string') && (e.key.length == 1) && (e.ctrlKey != true) && (e.altKey != true) && ((obj.remoteKeyMap == false) || (obj.debugmode > 0))) { + if ((typeof e.key == 'string') && (e.key.length == 1) && (e.ctrlKey != true) && (e.altKey != true) && (obj.remoteKeyMap == false)) { obj.SendKeyUnicode(obj.KeyAction.UP, e.key.charCodeAt(0)); } else { obj.SendKeyMsg(obj.KeyAction.UP, e); @@ -590,7 +590,7 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) { } obj.xxKeyDown = function (e) { if ((e.key != 'Dead') && (obj.State == 3)) { - if (!((typeof e.key == 'string') && (e.key.length == 1) && (e.ctrlKey != true) && (e.altKey != true) && ((obj.remoteKeyMap == false) || (obj.debugmode > 0)))) { + if (!((typeof e.key == 'string') && (e.key.length == 1) && (e.ctrlKey != true) && (e.altKey != true) && (obj.remoteKeyMap == false))) { obj.SendKeyMsg(obj.KeyAction.DOWN, e); if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); return false; } @@ -598,7 +598,7 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) { } obj.xxKeyPress = function (e) { if ((e.key != 'Dead') && (obj.State == 3)) { - if ((typeof e.key == 'string') && (e.key.length == 1) && (e.ctrlKey != true) && (e.altKey != true) && ((obj.remoteKeyMap == false) || (obj.debugmode > 0))) { + if ((typeof e.key == 'string') && (e.key.length == 1) && (e.ctrlKey != true) && (e.altKey != true) && (obj.remoteKeyMap == false)) { obj.SendKeyUnicode(obj.KeyAction.DOWN, e.key.charCodeAt(0)); } // else { obj.SendKeyMsg(obj.KeyAction.DOWN, e); } }