Hi,

I am using the following code to read in characters from the command line:

InputStreamReader isr = new InputStreamReader(System.in);
char in = 'a';
while(true)
{
in = (char)isr.read();
}

The problem with this is, the user needs to press the enter key every time they enter a character. I need the program to read the character the instant that they have pressed it, and it must not require the user to press the enter key.

Could anyone give me advice on how to go about this?

Thanks,
x0psci