Пример #1
0
 public static void KeyPress(EnumKeyboardKey key)
 {
     WindowsAPI.keybd_event(key, WindowsAPI.MapVirtualKey(key, 0), 0u, 0u);
     Thread.Sleep(0);
     WindowsAPI.keybd_event(key, WindowsAPI.MapVirtualKey(key, 0), 2u, 0u);
 }
Пример #2
0
 public static void KeyUp(EnumKeyboardKey key)
 {
     WindowsAPI.keybd_event(key, WindowsAPI.MapVirtualKey(key, 0), 2u, 0u);
 }