This commit is contained in:
evilC 2018-07-02 19:33:23 +01:00
parent 8875d02445
commit 13b8757024

View File

@ -176,15 +176,15 @@ namespace AutoHotInterception
public void SendKeyEvent(int id, ushort code, int state)
{
IsValidDeviceId(false, id);
var st = 1 - state;
var stroke = new ManagedWrapper.Stroke();
if (code > 255)
{
code -= 256;
state += 2;
st += 2;
}
stroke.key.code = code;
stroke.key.state = (ushort)(1 - state);
stroke.key.state = (ushort)st;
ManagedWrapper.Send(_deviceContext, id, ref stroke, 1);
}