mirror of
https://github.com/evilC/AutoHotInterception.git
synced 2024-11-12 13:10:47 +00:00
Fixes #16
This commit is contained in:
parent
8875d02445
commit
13b8757024
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user