diff --git a/public/scripts/agent-desktop-0.0.2.js b/public/scripts/agent-desktop-0.0.2.js index c498ab9e..be13bf29 100644 --- a/public/scripts/agent-desktop-0.0.2.js +++ b/public/scripts/agent-desktop-0.0.2.js @@ -46,6 +46,7 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) { obj.ScalingLevel = 1024; obj.FrameRateTimer = 100; obj.SwapMouse = false; + obj.UseExtendedKeyFlag = true; obj.FirstDraw = false; // Remote user mouse and keyboard lock @@ -402,7 +403,7 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) { if (!event) { event = window.event; } var extendedKey = false; // Test feature, add ?extkeys=1 to url to use. - if ((urlargs.noextkeys != 1) && (typeof event.code == 'string') && (event.code.startsWith('Arrow') || (extendedKeyTable.indexOf(event.code) >= 0))) { extendedKey = true; } + if ((obj.UseExtendedKeyFlag || (urlargs.extkeys == 1)) && (typeof event.code == 'string') && (event.code.startsWith('Arrow') || (extendedKeyTable.indexOf(event.code) >= 0))) { extendedKey = true; } if ((extendedKey == false) && event.code && (event.code.startsWith('NumPad') == false) && (obj.localKeyMap == false)) { // Convert "event.code" into a scancode. This works the same regardless of the keyboard language. diff --git a/views/default.handlebars b/views/default.handlebars index bff0893a..8135bddf 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -4742,6 +4742,7 @@ } else if (contype == 1) { // Setup the Mesh Agent remote desktop desk = CreateAgentRedirect(meshserver, CreateAgentRemoteDesktop('kvmid_' + shortid), serverPublicNamePort, authCookie, authRelayCookie, domainUrl); + desk.m.UseExtendedKeyFlag = (node.agent.id < 5); // Only use extended keys on Windows agents for now desk.m.mouseCursorActive(xxcurrentView == 11); desk.shortid = shortid; desk.attemptWebRTC = attemptWebRTC; @@ -8405,6 +8406,7 @@ } else if ((contype == null) || (contype == 1) || ((contype == 3) && (currentNode.agent.id > 4))) { // Setup the Mesh Agent remote desktop desktop = CreateAgentRedirect(meshserver, CreateAgentRemoteDesktop('Desk'), serverPublicNamePort, authCookie, authRelayCookie, domainUrl); + desktop.m.UseExtendedKeyFlag = (desktopNode.agent.id < 5); // Only use extended keys on Windows agents for now desktop.m.mouseCursorActive(xxcurrentView == 11); desktop.debugmode = debugmode; desktop.m.debugmode = debugmode;