I am writing an application that requires me to read a key from console without having to wait for the user to hit enter. I have read that JCurses library could help.
I tried using Toolkit.readCharacter()
like this:
InputChar c = Toolkit.readCharacter();
system.out.println(c.getCharacter());
But the problem was that the readCharacter()
method does not end execution no matter how many characters you input. Even if you press enter, it still seems that it is waiting for you to enter a character.
I really appreciate any help using JCurses, or any other way would do.