hitkb exists?

Fred Smith fredex at cg-atla.UUCP
Wed Feb 7 10:44:50 AEST 1990


In article <RON.90Feb4114158 at clarity.Princeton.EDU> ron at clarity.Princeton.EDU (Ronald Beekelaar) writes:
>Hi,
>
>  I left out some needed information in my question last night.
>I was wondering whether I can silently test whether a key has been pressed in
>C, without having to read(..). I forgot to tell that I am using MS-C on an
>IBM-PC. 
>


Yes.  You should read the section in your MSC manual about the routine
named "_bios_keybrd()". If you find that not to your liking, try "kbhit()"
(which, you should be warned, will give bogus results if you happen to
redirect stdin to your program)..

Fred



More information about the Comp.lang.c mailing list