What the java program should do is it should trigger keyboard press on some condition without a person pressing a keyboard key. So any program running in windows and in focus which requires keyboard input will get the input without a person actually pressing the keyboard.
I found these related questions here : question 1, question 2
I was wondering if there is any method to do this in Java.