Type or namespace 'InputSimulator' could not be found

Feb 4, 2015 at 6:19 PM
I have a simple form with a button, when the button is clicked a message is displayed. I'm using the Keyboard.KeyPress(VirtualKeyCode.RETURN) to simulate a user clicking the button. I getting the "Type or namespace 'InputSimulator' could not be found" message and I have the InputSimulator.dll added. Not sure what's going on. Code is below, thanks.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using WindowsInput.Native;

namespace TestButton
public partial class frmTest : Form
    public frmTest()

    //public void PressReturn()
    //    InputSimulator.SimulateKeyPress(VirtualKeyCode.RETURN);

    private void btnTestButton_Click(object sender, EventArgs e)
        btnTestButton.Enabled = true;
        InputSimulator s = new InputSimulator();

        System.Windows.Forms.MessageBox.Show("Test Button was clicked");


May 1, 2015 at 10:05 PM
add the following line at the top of the code:
using WindowsInput;