/// <summary> /// Warning: Do not use this overload of SendKey() for non-letter, non-number, or non-ENTER keys. It may require a special KeyState of not KeyState.Down or KeyState.Up, but instead KeyState.E0 and KeyState.E1. /// </summary> public void SendKey(InterceptionKeys key) { SendKey(key, KeyState.Down); if (KeyPressDelay > 0) { Thread.Sleep(KeyPressDelay); } SendKey(key, KeyState.Up); }
public void SendKey(InterceptionKeys key, KeyState state, int device) { Stroke stroke = new Stroke(); KeyStroke keyStroke = new KeyStroke { Code = key, State = state }; stroke.Key = keyStroke; InterceptionDriver.Send(Context, device, ref stroke, 1); if (KeyPressDelay > 0) { Thread.Sleep(KeyPressDelay); } }
public void SendKey(InterceptionKeys key, KeyState state) { SendKey(key, state, DeviceID); }