On Tuesday, 10 February 2015 at 23:39:56 UTC, Adam D. Ruppe wrote:
On Tuesday, 10 February 2015 at 21:11:14 UTC, Paul wrote:
Yes, I noted the default values, even if I don't understand what they do at present(!).

They allow overriding of the input/output files. fdIn normally refers to standard input, fdOut refers to standard output, and the getSizeOverride lets you provide a custom function instead of the default, which is to ask the operating system for the size of the terminal with ioctl.


I added those options to support my detachable.d program, which is like GNU Screen - it can detach from the terminal and keep running. Instead of talking straight to the actual terminal files, it talks through a socket to a helper program which lets it be reattached on a new terminal.

How do I get/process input? Looking at the source/doc it looks like I should be doing something like this for an inifinite loop breakable with Esc but it doesn't seem to work (in urxvt or a plain xterm):

dchar charIn;
while(charIn != '\U0000001b')
{
auto myInput = RealTimeConsoleInput(&myTerm, ConsoleInputFlags.raw);
        charIn = myInput.getch();
}

Reply via email to