ganado / redtamarin

Automatically exported from code.google.com/p/redtamarin
Other
2 stars 0 forks source link

Implement non-blocking I/O from stdin or console #40

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently there is no way to non-blocking reads from the keyboard, such as 
reading single characters as might be required by a game.

System.readLine() is blocking, and requires enter key to be 
System.isStdinEmpty() never goes false if keys are waiting in buffer
System.stdinLength always reports 0 bytes even if keys are in buffer.

Original issue reported on code.google.com by thegar...@gmail.com on 17 Jul 2011 at 4:53

GoogleCodeExporter commented 9 years ago
so far I had bad experience with WIndows supporting stdin/stdout etc.

the whole reason System.isStdinEmpty() etc. are considered beta
it is because they were half-working under windows (all is fine under OSX and 
Linux)

I gonna look into it but not even sure it is possible

my problem is not really about capturing the key,
it's about capturing the key(s) while the program flow is not blocked
and doing that in a cross platform way

Original comment by zwetan on 18 Jul 2011 at 1:07

GoogleCodeExporter commented 9 years ago
implemented in 0.3.2

Original comment by zwetan on 30 Sep 2011 at 1:19