Get single keystroke?
Sean Eskapp
eatingstaples at gmail.com
Mon Mar 21 14:46:55 PDT 2011
== Quote from Andrej Mitrovic (andrej.mitrovich at gmail.com)'s article
> Here's something simpler:
> import std.stdio : writefln;
> extern(C) int kbhit();
> extern(C) int getch();
> void main()
> {
> while(!kbhit())
> {
> // keep polling
> // might use thread.sleep here.
> }
> writefln("Key hit was %s.", getch());
> }
What extra linker dependencies does this add?
More information about the Digitalmars-d-learn
mailing list