Esempio n. 1
0
        public static void SendInput(ScanCode scanCode, VirtualKeys virtualKey, KeyEventFlag keyEvent)
        {
            var inputs = new[]
            {
                CreateKeyboardInput(scanCode, virtualKey, keyEvent),
            };

            Win32.SendInput(1, inputs, Input.Size);
        }
Esempio n. 2
0
 public static extern void keybd_event(byte bVk, byte bScan, KeyEventFlag dwFlags, int dwExtraInfo);
Esempio n. 3
0
 //键盘操作
 public void keybd(byte _bVk, KeyEventFlag _dwFlags)
 {
     keybd_event(_bVk, 0, _dwFlags, 0);
 }
Esempio n. 4
0
 public static Input CreateKeyboardInput(ScanCode scanCode, VirtualKeys virtualKey, KeyEventFlag keyEvent) => new Input()
 {
     type = InputType.KEYBOARD,
     U    = new InputUnion
     {
         ki = new KeyboardInput()
         {
             time    = 0,
             wScan   = scanCode,
             wVk     = virtualKey,
             dwFlags = keyEvent,
         }
     }
 };
Esempio n. 5
0
 public static extern void keybd_event(Byte bVk, Byte bScan, KeyEventFlag dwFlags, Int32 dwExtraInfo);
Esempio n. 6
0
        //键盘操作

        public void Keybd(Byte _bVk, KeyEventFlag _dwFlags)

        {
            Keybd_event(_bVk, 0, _dwFlags, 0);
        }
Esempio n. 7
0
        private void virtual_KeyboardEvent(byte key, KeyEventFlag _dwFlags)

        {
            keybd_event(key, 0, _dwFlags, 0);
        }
Esempio n. 8
0
 private static extern void keybd_event(
     byte bVk, byte bScan, KeyEventFlag dwFlags,
     IntPtr dwExtraInfo);