title: How to simulate a key press in C++
body: <p>I was wondering how can I simulate a key depression in C++. Such as having code that when I run the program it presses the letter "W" key. I don't want to be displaying it in a console window I just want it to display the "W" key every time I click on a text field. Thanks!</p>
  
  <p>Note: I am not trying to make a spammer.</p>