Пример #1
0
        /// <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);
        }
Пример #2
0
 public static void KeyboardInputTest()
 {
     //string input = "2*5*5{Divide}5*5*5{Enter}";
     //AutoSharpKeyboardInput.SendKeyboardInputToWindow(input, "Calculator", 1000);
     AutoSharpUI.KeyboardEvent(KeyboardKeyCodes.VK_CAPITAL);
 }