I want to get the position of the terminal with the ANSI escape code \033[6n
. I do this with a simple:
System.out.print("\033[6n");
This will put a response, like [[33;225R
in stdin. How do I get this response? I've tried System.in.read()
, but this waits for the user to press enter, which I don't want.