It is pretty easy to read input from console after it was submitted by hitting Enter
key. Such ways as System.console()
, System.in
, Scanner
and more.
String out = System.console().readLine();
I wonder if there is a way to read unsubmitted characters from console (specially from CMD)
UPDATE
Best solution I found so far is to use some low-level library like JNativeHook.