I know it is possible to loop until the user presses the enter key:
while (system.in.available() == 0) {
// ...
}
But I don't know how to loop until the user presses any key:
while (any_key_is_not_pressed) {
// ...
}
I know that there is a way to do it in a GUI by tracking keyboard events. Can I do it in a console app?
Thanks!