RealTimeConsoleInput

Encapsulates the stream of input events received from the terminal input.

struct RealTimeConsoleInput {
ubyte[128] hack;
HANDLE inputHandle;
int delegate(char) inputPrefilter;
InputEvent[] inputQueue;
}

Disabled Default Constructor

A disabled default is present on this object. To use it, use one of the other constructors or a factory function.

Constructors

this
this(Terminal* terminal, ConsoleInputFlags flags)

To capture input, you need to provide a terminal and some flags.

Destructor

A destructor is present on this object, but not explicitly documented in the source.

Postblit

Copying this object is disabled.

A postblit is present on this object, but not explicitly documented in the source.

Members

Functions

getch
dchar getch(bool nonblocking = false)

Get one key press from the terminal, discarding other events in the process. Returns dchar.init upon receiving end-of-file.

kbhit
bool kbhit()

Returns true if there iff getch() would not block.

nextEvent
InputEvent nextEvent()

Returns the next event.

timedCheckForInput
bool timedCheckForInput(int milliseconds)

Check for input, waiting no longer than the number of milliseconds

Meta