Exemplo n.º 1
0
        public static void TypeKey(bool up, ScanCode code)
        {
            tagKEYBDINPUT input = new tagKEYBDINPUT()
            {
                wScan = code
            };

            if (up)
            {
                input.dwFlags = KeyEventFlags.KEYEVENTF_KEYUP;
            }
            InjectKeyboardInput(ref input, 1);
        }
Exemplo n.º 2
0
 private static extern bool InjectKeyboardInput(ref tagKEYBDINPUT input, uint count);