Keypress Generator

Here is a quick and dirty way to simulate a keypress using the Robot class in Java. If you provide a string to the constructor and call the type() method, each of the characters in the string will be generated as a keypress. The code only supports A-Z and a-z, but could be modified to cover a larger character set.

Leave a Comment