Skip to content

Commit

Permalink
fix numlock sending extended keys incorrectly (#5735)
Browse files Browse the repository at this point in the history
Signed-off-by: si458 <simonsmith5521@gmail.com>
  • Loading branch information
si458 committed Jan 26, 2024
1 parent c331eca commit ceba76c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apprelays.js
Expand Up @@ -1046,7 +1046,11 @@ module.exports.CreateMstscRelay = function (parent, db, ws, req, args, domain) {
if ((k == 14) || (k == 28)) { ok = true; } // Enter and backspace
if (ok == false) return;
}
if (rdpClient && (obj.viewonly != true)) { rdpClient.sendKeyEventScancode(msg[1], msg[2]); } break;
var extended = false;
var extendedkeys = [57419,57421,57416,57424,57426,57427,57417,57425,57372,57397,57415,57423,57373,57400,57399];
// left,right,up,down,insert,delete,pageup,pagedown,numpadenter,numpaddivide,home,end,controlright,altright,printscreen
if (extendedkeys.includes(msg[1])) extended=true;
if (rdpClient && (obj.viewonly != true)) { rdpClient.sendKeyEventScancode(msg[1], msg[2], extended); } break;
}
case 'unicode': { if (rdpClient && (obj.viewonly != true)) { rdpClient.sendKeyEventUnicode(msg[1], msg[2]); } break; }
case 'utype': {
Expand Down

0 comments on commit ceba76c

Please sign in to comment.