Beispiel #1
0
        public IKeyboardSimulator KeyPress(params Win32Constants.VirtualKeys[] keyCodes)
        {
            var builder = new InputBuilder();

            KeysPress(builder, keyCodes);
            SendSimulatedInput(builder.ToArray());
            return(this);
        }
Beispiel #2
0
        public IKeyboardSimulator ModifiedKeyStroke(
            IEnumerable <Win32Constants.VirtualKeys> modifierKeyCodes, IEnumerable <Win32Constants.VirtualKeys> keyCodes)
        {
            var builder = new InputBuilder();

            Win32Constants.VirtualKeys[] virtualKeyss = modifierKeyCodes.ToArray();
            ModifiersDown(builder, virtualKeyss);
            KeysPress(builder, keyCodes);
            ModifiersUp(builder, virtualKeyss);

            SendSimulatedInput(builder.ToArray());
            return(this);
        }