Example #1
0
        /// <summary>
        /// Simulate pressing special key i.e: UP ARROW
        /// </summary>
        /// <param name="key">special key</param>
        public static void SendSpecialKey(SpecialKeySCS key)
        {
            INPUT input = new INPUT();

            input.type         = 1;
            input.U.ki.wScan   = (ScanCodeShort)key;
            input.U.ki.dwFlags = KEYEVENTF.EXTENDEDKEY | KEYEVENTF.SCANCODE;

            KeyboardHook.SendTroughApi();
            SendInput((uint)1, new INPUT[] { input }, INPUT.Size);
        }
Example #2
0
 private static void Send(INPUT input)
 {
     KeyboardHook.SendTroughApi();
     SendInput((uint)1, new INPUT[] { input }, INPUT.Size);
 }