1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-22 03:03:18 +00:00

Fixed bug where VkKeyScan wasnt properly masking the results

This commit is contained in:
Bryan Roe
2019-08-15 23:52:27 -07:00
parent afa2ad1723
commit 07cfa46500

View File

@@ -399,8 +399,8 @@ function windows_terminal() {
} }
this._WriteCharacter = function (key, bControlKey) this._WriteCharacter = function (key, bControlKey)
{ {
var scanCode = this._user32.VkKeyScanA(key).Val; var scanCode = this._user32.VkKeyScanA(key).Val & 0xFF;
if (scanCode < 0 || scanCode > 255) { return; } if (key == 10) { return; }
var rec = GM.CreateVariable(20); var rec = GM.CreateVariable(20);
rec.Deref(0, 2).toBuffer().writeUInt16LE(KEY_EVENT); // rec.EventType rec.Deref(0, 2).toBuffer().writeUInt16LE(KEY_EVENT); // rec.EventType