kbhit()
Gad Hayisraeli
gad@syete.co.il
Sun Jan 14 05:35:00 GMT 2001
i tried several kbhit() fucntions for linux:
1. the one that uses "select" and FDSET , etc.
2. speciall library - libkb (include <kb.h> and use the libkb.so lib)
in all methods of kbhit, i always got infinite printing on SINGLE key press,
while i wanted simply to print one line per keypress. here's my code:
int main()
{
while(1)
{
if (kbhit()) //in the lib function i changed to kb_kbhit()
printf("key pressed...\n");
}
}
GAD.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/vnd.ms-tnef
Size: 1716 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20010114/58b168ef/attachment.tnef>
More information about the crossgcc
mailing list