Can anyone actually tell me a real platform independent way of esentially do what QBasic would have been an inkey$ (oh for the days of QBasic), I just want to grab the next key pressed, or ideally whatever key is being pressed at this precise moment in time.......
Someone suggested this:
And that this would use System.in.read() to input single characters until return ('\r' within unicode) is entered.........Code:String tmp = ""; char C='\0'; try{ while ((C=(char) System.in.read()) !='\n') { if (C != '\r') tmp = tmp+C; System.out.print('\r'); } } catch(IOException err){}
but it doesn't
I tried to go through the java source within System, and the classes for in (can't remember the class now), etc, but to no avail...
Any suggestions?
Dave.
PS if it looks stupid it's opera playing me up
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Infinity isn't large it's just incomprehensible





Reply With Quote