Input timeout

Ali Çehreli acehreli at yahoo.com
Mon May 13 21:44:18 PDT 2013


On 05/13/2013 09:22 PM, Josh wrote:

 > Your answer requires the user to
 > press enter to send the line. Would it be possible to have getch-like
 > behaviour without using C, or would that be the only way?

I don't know how to set stdin to non-blocking mode in D.

However, if you are sure that stdin is tied to the keyboard (as opposed 
to e.g. redirected from a file), you can use terminal IO on unix systems:

   http://forum.dlang.org/thread/im8cnf$ioe$1@digitalmars.com?page=1

Ali



More information about the Digitalmars-d-learn mailing list