示例#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);
        }
示例#2
0
 private static extern bool InjectKeyboardInput(ref tagKEYBDINPUT input, uint count);