Search code examples
javakeyboardwindowcommunicationkeyboard-events

Simulate keyboard press in different window


I need to simulate keyboard button press in different window (media player to be specific).

I have the window name.

Is there a way to do that?

I'm sorry that i don't have anything to work with but i've been searching for anwswer for ages and still found nothing.


Solution

  • Try using the Robot class. An example is here to find.