nyan Posted September 9, 2015 Share Posted September 9, 2015 Simple question. I could probably find the answer myself but I hate looking when asking is easier. How do I use the esc key in my scripts? keyboard.typeKey() is what I assume I'm supposed to be using but what is the key code or char that I need to use for ESC. And for future reference, what is the code/char for other keys such as TAB, ENTER, SHIFT, CTRL? Shiny Quote Link to comment Share on other sites More sharing options...
Chicken Wing Posted September 9, 2015 Share Posted September 9, 2015 (edited) http://www.asciitable.com/ Use the decimal number, so ESC would be 27 and tab is 9 oh and cast it as a char; getKeyboard().typeKey((char) 27); Edited September 9, 2015 by Chicken Wing Quote Link to comment Share on other sites More sharing options...
FrostBug Posted September 9, 2015 Share Posted September 9, 2015 KeyEvent.VK_ESCAPE Quote Link to comment Share on other sites More sharing options...
nyan Posted September 9, 2015 Author Share Posted September 9, 2015 http://www.asciitable.com/ Use the decimal number, so ESC would be 27 and tab is 9 oh and cast it as a char; getKeyboard().typeKey((char) 27); KeyEvent.VK_ESCAPE Thanks guys! I really appreciate it Quote Link to comment Share on other sites More sharing options...