0

I got the question how I can give key input/output to(or better from) java. That means that the programme runs and says for example to a game the key input "W". Important is that it acts like the keyboard. So the programme I "want to talk" to thinks that the keyboard is giving that input.

Thanks in advance

Lucas

  • Welcome to SO. Your question is not clear to me. Do you want to simulate keyboard clicks using java ? – c0der May 21 '17 at 13:20
  • yes that hits the point pretty good –  May 21 '17 at 15:44
  • [Robot](http://docs.oracle.com/javase/7/docs/api/java/awt/Robot.html) is your friend. There are many answers on SO [1](http://stackoverflow.com/questions/12222018/how-to-simulate-keyboard-press-in-java) and [2](http://stackoverflow.com/questions/30391438/simulate-keypress-in-java-to-write-user-inputs-to-another-application) and [3](http://stackoverflow.com/questions/7745959/how-to-simulate-keyboard-presses-in-java) – c0der May 21 '17 at 16:04
  • Possible duplicate of [How to simulate keyboard presses in java?](http://stackoverflow.com/questions/7745959/how-to-simulate-keyboard-presses-in-java) – c0der May 21 '17 at 16:08

0 Answers0