Ejemplo n.º 1
0
        /// <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);
        }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 3
0
 public void SendKey(InterceptionKeys key, KeyState state)
 {
     SendKey(key, state, DeviceID);
 }