Beispiel #1
0
 public static void KeybdEvent(byte key, byte bScan, KeybdEventFlag flags, uint dwExtraInfo)
 {
     global::CJBasic.Helpers.INPUT pInputs = new global::CJBasic.Helpers.INPUT();
     pInputs.type       = 1;
     pInputs.ki.wVk     = key;
     pInputs.ki.wScan   = MapVirtualKey(key, 0);
     pInputs.ki.dwFlags = (int)flags;
     SendInput(1, ref pInputs, Marshal.SizeOf(pInputs));
 }
Beispiel #2
0
        public static void KeybdEvent(byte key, byte bScan, KeybdEventFlag flags, uint dwExtraInfo)
        {
            INPUT input = new INPUT();

            input.type       = 1; //keyboard
            input.ki.wVk     = key;
            input.ki.wScan   = MapVirtualKey(key, 0);
            input.ki.dwFlags = (int)flags;
            SendInput(1, ref input, Marshal.SizeOf(input));
        }
Beispiel #3
0
 public static extern void KeybdEvent2(byte key, byte bScan, KeybdEventFlag flags, uint dwExtraInfo);
 public static extern void KeybdEvent2(byte key, byte bScan, KeybdEventFlag flags, uint dwExtraInfo);
 public static void KeybdEvent(byte key, byte bScan, KeybdEventFlag flags, uint dwExtraInfo)
 {     
     INPUT input = new INPUT();            
     input.type = 1; //keyboard
     input.ki.wVk = key;
     input.ki.wScan = MapVirtualKey(key, 0); 
     input.ki.dwFlags = (int)flags;
     SendInput(1, ref input, Marshal.SizeOf(input));
 }
Beispiel #6
0
 public static extern void keybd_event(byte bVk, byte bScan, KeybdEventFlag dwFlags, uint dwExtraInfo);