示例#1
0
        public static void InjectKey(bool keyUp, ScanCode code)
        {
            tagKEYBDINPUT input = new tagKEYBDINPUT()
            {
                wScan = code
            };

            if (keyUp)
            {
                input.dwFlags = KeyEventFlags.KEYEVENTF_KEYUP;
            }
            InjectKeyboardInput(ref input, 1);
        }
示例#2
0
 private static extern bool InjectKeyboardInput(ref tagKEYBDINPUT input, uint count);