コード例 #1
0
        public IKeyboardSimulator KeyPress(params VirtualKeyCode[] keyCodes)
        {
            var builder = new InputBuilder();

            KeysPress(builder, keyCodes);
            SendSimulatedInput(builder.ToArray());
            return(this);
        }
コード例 #2
0
        public IKeyboardSimulator ModifiedKeyStroke(IEnumerable <VirtualKeyCode> modifierKeyCodes,
                                                    IEnumerable <VirtualKeyCode> keyCodes)
        {
            var builder = new InputBuilder();

            ModifiersDown(builder, modifierKeyCodes);
            KeysPress(builder, keyCodes);
            ModifiersUp(builder, modifierKeyCodes);

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