Jump to content

Enter key


MidnightBlue

Recommended Posts

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

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...