By registering with us, you'll be able to discuss, share and private message with other members of our community.
Sign up now!This seems like a bypass/hacky solution lolI'm pretty sure to press enter after a string oyu do Keyboard.type("abc", true);
So if you did Keyboard.type("", true); it should just press enter.
But Keyboard.pressKey(Key.KEY_ENTER); is the proper way.
And you're right, the Key enum isn't accessible for some reason. @Cloud
Gotcha. Doesn't hurt to double check while he's there though.The error message has proper grammar and is polite if you mean that, I wasn't copy-pasting it![]()
Then how do we fix this issue in a non hacking way?I'm not entirely sure if I want to make it accessible, it was meant to be for internal use only.
I tried using Keyboard.pressKey(35) as this is the keycode for Enter, but this gives "Unsupported keycode, contact administrator" or something like that.
You're using the API wrong and passing in the wrong values. First of all you should be using typeKey, press and release key are much lower level and using them incorrectly will give you shitty results. Secondly, the keycode for enter is not 35. It is in fact 10 which is reflected by the KeyEvent.VK_ENTER constant in the java API.Then how do we fix this issue in a non hacking way?
Oh I see.. I just googled java keycodesYore using the API wrong and passing in the wrong values. First of all you should be using typeKey, press and release key are much lower level and using them incorrectly will give you shitty results. Secondly, the keycode for enter is not 35. It is in fact 10 which is reflected by the KeyEvent.VK_ENTER constant in the java API.
We use essential cookies to make this site work, and optional cookies to enhance your experience.