/// <summary> /// Handles NES key event /// </summary> /// <param name="key">The button pressed</param> /// <param name="state">The state of the button</param> public static void NESKeyEvent(GenericKeyNameEnum key, ConsoleKeyStateEnum state) { var kbKey = GenericKeyNameToKeyCodeFromSelectedNESKeysConverter.Convert(key); var kbState = ConsoleKeyStateEnumToKeyboardEventFlagConverter.Convert(state); AutoSharpUI.KeyboardEvent(kbKey, 0, kbState); }
public static void KeyboardInputTest() { //string input = "2*5*5{Divide}5*5*5{Enter}"; //AutoSharpKeyboardInput.SendKeyboardInputToWindow(input, "Calculator", 1000); AutoSharpUI.KeyboardEvent(KeyboardKeyCodes.VK_CAPITAL); }