Fixes to remote desktop international keyboard support.

Ylian Saint-Hilaire committed Nov 27, 2020 at 09:07 UTC 192844d29e3b26320dc54a8e0f7c41257ef0f10e
1 file changed +7 -2
public/scripts/agent-desktop-0.0.2.js
+7 -2
@@ -541,11 +541,16 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
541 }
542 obj.xxKeyDown = function (e) {
543 if ((e.key != 'Dead') && (obj.State == 3)) {
544 - 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); }
544 + if (!((e.key.length == 1) && (e.ctrlKey != true) && (e.altKey != true) && ((obj.remoteKeyMap == false) || (obj.debugmode > 0)))) {
545 + obj.SendKeyMsg(obj.KeyAction.DOWN, e);
546 + if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); return false;
547 + }
548 }
546 - if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); return false;
549 }
550 obj.xxKeyPress = function (e) {
551 + if ((e.key != 'Dead') && (obj.State == 3)) {
552 + 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); }
553 + }
554 if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); return false;
555 }
556