Make it so &debug=1 does not automatically send unicode keys in remote desktop.

Ylian Saint-Hilaire committed Feb 28, 2022 at 20:14 UTC 6b19e2f818d1839e2d469dc6cdac0d94d5e76c0b
1 file changed +3 -3
public/scripts/agent-desktop-0.0.2.js
+3 -3
@@ -580,7 +580,7 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
580 obj.xxMouseWheel = function (e) { if (obj.State == 3) { obj.SendMouseMsg(obj.KeyAction.SCROLL, e); return false; } return true; }
581 obj.xxKeyUp = function (e) {
582 if ((e.key != 'Dead') && (obj.State == 3)) {
583 - if ((typeof e.key == 'string') && (e.key.length == 1) && (e.ctrlKey != true) && (e.altKey != true) && ((obj.remoteKeyMap == false) || (obj.debugmode > 0))) {
583 + if ((typeof e.key == 'string') && (e.key.length == 1) && (e.ctrlKey != true) && (e.altKey != true) && (obj.remoteKeyMap == false)) {
584 obj.SendKeyUnicode(obj.KeyAction.UP, e.key.charCodeAt(0));
585 } else {
586 obj.SendKeyMsg(obj.KeyAction.UP, e);
@@ -590,7 +590,7 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
590 }
591 obj.xxKeyDown = function (e) {
592 if ((e.key != 'Dead') && (obj.State == 3)) {
593 - if (!((typeof e.key == 'string') && (e.key.length == 1) && (e.ctrlKey != true) && (e.altKey != true) && ((obj.remoteKeyMap == false) || (obj.debugmode > 0)))) {
593 + if (!((typeof e.key == 'string') && (e.key.length == 1) && (e.ctrlKey != true) && (e.altKey != true) && (obj.remoteKeyMap == false))) {
594 obj.SendKeyMsg(obj.KeyAction.DOWN, e);
595 if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); return false;
596 }
@@ -598,7 +598,7 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
598 }
599 obj.xxKeyPress = function (e) {
600 if ((e.key != 'Dead') && (obj.State == 3)) {
601 - if ((typeof e.key == 'string') && (e.key.length == 1) && (e.ctrlKey != true) && (e.altKey != true) && ((obj.remoteKeyMap == false) || (obj.debugmode > 0))) {
601 + if ((typeof e.key == 'string') && (e.key.length == 1) && (e.ctrlKey != true) && (e.altKey != true) && (obj.remoteKeyMap == false)) {
602 obj.SendKeyUnicode(obj.KeyAction.DOWN, e.key.charCodeAt(0));
603 } // else { obj.SendKeyMsg(obj.KeyAction.DOWN, e); }
604 }