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

This commit is contained in:
Ylian Saint-Hilaire 2022-02-28 20:14:56 -08:00
parent 870cc85de9
commit 6b19e2f818

View File

@ -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); }
}