KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I want to type : using Java Robot. However, I'm getting an IllegalArgumentException . My code is: robot.keyPress(KeyEvent.VK_SHIFT); robot.keyPress(KeyEvent.VK_COLON); robot.keyRelease(KeyEvent.VK_COLON); robot.keyRelease(KeyEvent.VK_SHIFT); The exception is: java.lang.IllegalArgumentException: Invalid key code.]. I also tried with: robot.keyPress(KeyEvent.VK_SHIFT); robot.keyPress(KeyEvent.VK_SEMICOLON); robot.keyRelease(KeyEvent.VK_SEMICOLON); robot.keyRelease(KeyEvent.VK_SHIFT); How can I solve this problem?
Tags (comma-separated)
Save Edits
Cancel