Results 1 to 1 of 1
- 11-23-2007, 04:28 PM #1
Member
- Join Date
- Nov 2007
- Posts
- 1
- Rep Power
- 0
Reading Char without needing to press enter
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
Similar Threads
-
simulate form type=button press with java application
By redmoonzer01 in forum NetworkingReplies: 1Last Post: 03-29-2008, 06:28 AM -
Java Control Panel not saving changes when I press OK
By RebelScum in forum New To JavaReplies: 0Last Post: 03-21-2008, 04:22 PM -
Press any key to continue/press enter
By JT4NK3D in forum New To JavaReplies: 1Last Post: 11-17-2007, 09:27 PM -
Needing Help!!
By kingjut06 in forum JDBCReplies: 1Last Post: 07-07-2007, 11:38 PM -
Javascript and enter button
By Eric in forum Advanced JavaReplies: 1Last Post: 06-11-2007, 09:39 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks