keypressed()

Shekar_Narayanan.SV at Xerox.COM Shekar_Narayanan.SV at Xerox.COM
Sat Feb 20 04:07:15 AEST 1988


Patrik,

	If you are working in Turbo-C or Microsoft-C environment and in the MS-DOS
world, they both have function/procedure which does exactly what you want.
However you may have do more work if you need to scan for special keys such
Function keys (F1-F10) or CTRL+Characters. The function provided in the C
library in Turbo & MSC is "kbhit()" which returns true if any key was pressed
else zero. If you do not want to echo the character read in to the terminal use
the function getch() in C run time library. 

	Hope this helps.

	Shekar



More information about the Comp.lang.c mailing list