diff --git a/public/scripts/agent-desktop-0.0.2.js b/public/scripts/agent-desktop-0.0.2.js index a8bc66f7..6679ad5b 100644 --- a/public/scripts/agent-desktop-0.0.2.js +++ b/public/scripts/agent-desktop-0.0.2.js @@ -541,11 +541,16 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) { } obj.xxKeyDown = function (e) { if ((e.key != 'Dead') && (obj.State == 3)) { - if ((e.key.length == 1) && (e.ctrlKey != true) && (e.altKey != true) && ((obj.remoteKeyMap == false) || (obj.debugmode > 0))) { obj.SendKeyUnicode(obj.KeyAction.DOWN, e.key.charCodeAt(0)); } else { obj.SendKeyMsg(obj.KeyAction.DOWN, e); } + if (!((e.key.length == 1) && (e.ctrlKey != true) && (e.altKey != true) && ((obj.remoteKeyMap == false) || (obj.debugmode > 0)))) { + obj.SendKeyMsg(obj.KeyAction.DOWN, e); + if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); return false; + } } - if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); return false; } obj.xxKeyPress = function (e) { + if ((e.key != 'Dead') && (obj.State == 3)) { + if ((e.key.length == 1) && (e.ctrlKey != true) && (e.altKey != true) && ((obj.remoteKeyMap == false) || (obj.debugmode > 0))) { obj.SendKeyUnicode(obj.KeyAction.DOWN, e.key.charCodeAt(0)); } //else { obj.SendKeyMsg(obj.KeyAction.DOWN, e); } + } if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); return false; }