MidnightBlue Posted April 7, 2014 Share Posted April 7, 2014 So I'm using this custom type method because the built in type method uses delay. So I want to simulate hitting the enter key but it won't work, I think I have to add some delay between hitting the keys and hitting enter but I don't know if you can. Can somebody please check out my code? public void test(String message) throws InterruptedException { for(char c : message.toCharArray()) { bot.getKeyboard().typeKeyEvent(c, 0); } bot.getKeyboard().typeKeyEvent((char) KeyEvent.VK_ENTER, 0); } Link to comment Share on other sites More sharing options...
Ande Posted April 7, 2014 Share Posted April 7, 2014 This seemed to work. bot.getKeyboard().pressKey((char)KeyEvent.VK_ENTER); bot.getKeyboard().releaseKey((char)KeyEvent.VK_ENTER); Link to comment Share on other sites More sharing options...