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); }
public static void KeyUp(EnumKeyboardKey key) { WindowsAPI.keybd_event(key, WindowsAPI.MapVirtualKey(key, 0), 2u, 0u); }