Re: [dart-misc] How use from stdin 'fgetc' functiality?

190 views
Skip to first unread message
Message has been deleted

William Hesse

unread,
Aug 16, 2012, 4:52:05 AM8/16/12
to mi...@dartlang.org
The buffering of input data until <enter> is pressed is done by the
terminal IO system of the OS. We need to change this to "raw" mode,
using OS dependent system calls. On Linux, this would be termio or
tty or curses library, with termio as the lowest level. This should
be filed as a feature request. Other environments, such as Ruby and
Node.JS provide method calls to change this setting on an input
stream. I don't think it can be done from the terminal program.


On Thu, Aug 16, 2012 at 9:18 AM, mezoni <andrew...@gmail.com> wrote:
> InputStream 'read' method does not send any data until user don't finalize
> input from console by pressing enter key.
> How read or get each pressed (inputed) key from console (stdin)?
>
> By example.
> while(true) {
> int c = inpStream.getChar();
> if(c == 10) {
> // Newline key pressed.
> break;
> }
> }
>
> --
> Consider asking HOWTO questions at Stack Overflow:
> http://stackoverflow.com/tags/dart
>
>



--
William Hesse

Seth Ladd

unread,
Aug 16, 2012, 6:53:37 PM8/16/12
to mi...@dartlang.org
Thanks Bill.

Hi Andrew, you can file this feature request here: http://dartbug.com/new
Reply all
Reply to author
Forward
0 new messages