Using Java to send key combinations
问题 As per this previous link (How to send keyboard outputs) Java can simulate a key being pressed using the Robot class. However, how could a combination of key presses be simulated? If I wanted to send the combination "alt-123" would this be possible using Robot? 回答1: The simple answer is yes. Basically, you need to wrap the keyPress/Release of the Alt around the other keyPress/Release s public class TestRobotKeys { private Robot robot; public static void main(String[] args) { new TestRobotKeys