Get single keystroke?

Andrej Mitrovic andrej.mitrovich at gmail.com
Mon Mar 21 14:55:04 PDT 2011


On 3/21/11, Sean Eskapp <eatingstaples at gmail.com> wrote:
> == 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?
>

snn.lib


More information about the Digitalmars-d-learn mailing list