• Post Reply Bookmark Topic Watch Topic
  • New Topic

Press any key to continue ...  RSS feed

 
Vinod John
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to implement a java application (console application), to wait for a (any) key input and start processing immediatly after getting the input, instead of waiting for a enter key input ?.
Think the question is bit long ... in short
When the app display a message "Press any key to continue ...", as soon a single key is pressed the application should start processing.
 
Joe Ess
Bartender
Posts: 9429
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can't do "any" key. The keyboard buffer flushes with the "enter" key.

[ November 20, 2003: Message edited by: Joe Ess ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!