How to take standard input from user and use that across Appium Test Case?

I have a scenario where I want to take User Standard Input from the console (Using Scanner(System.in) utility in Java).

Like, When a particular text field is being appeared then User need to type the input text as standard input rather than a device itself.

I am trying below code:

System.out.println("Enter the User Input: ");
Scanner sc = new Scanner(System.in);
String inputForTextField = sc.next();
getTextField().sendKeys(inputForTextField);

But the execution is getting stuck on String inputForTextField = sc.next(); User is not able to enter the text on the console and after 60 seconds Appium session is getting timed out.

Any help/suggestion would really be appreciated!

I am also open to hearing suggestion if I can take input from User using some Java AWT prompt, I just wanted to take user input from the computer rather than the device itself.

Thanks