[ Usenet FAQs | Web FAQs | Documents | RFC Index ]
Part1 - Part2 - Part3 - Part4 - Part5 - Single Page
Top Document: comp.os.msdos.programmer FAQ part 2/5
Previous Document: - How can I read a character without echoing it to the screen, and without waiting for the user to press the Enter key?
Next Document: - How can I disable Ctrl-C/Ctrl-Break and/or Ctrl-Alt-Del?
-
Search the FAQ Archives
Part1 - Part2 - Part3 - Part4 - Part5 - Single Page
Top Document: comp.os.msdos.programmer FAQ part 2/5
Previous Document:
Next Document:
- How can I find out whether a character has been typed, without waiting for one?
Date: 5 Feb 2002 22:03:03 -0400 In Turbo Pascal, use KeyPressed. Both Microsoft C and Turbo C offer the kbhit() function. All of these tell you whether a key has been pressed. If no key has been pressed, they return that information to your program. If a keystroke is waiting, they tell your program that but leave the key in the input buffer. You can use the BIOS call, INT 16 AH=01 or 11, to check whether an actual keystroke is waiting; or the DOS call, INT 21 AH=0B, to check for a keystroke from stdin (subject to redirection). See Ralf Brown's interrupt list <Q:02.03> [What and where is Ralf Brown's interrupt list?].
Top Document: comp.os.msdos.programmer FAQ part 2/5
Previous Document:
Next Document:
Part1 - Part2 - Part3 - Part4 - Part5 - Single Page
[ Usenet FAQs | Web FAQs | Documents | RFC Index ]
Send corrections/additions to the FAQ Maintainer:
jeffrey@carlyle.org (Jeffrey Carlyle)
Last Update October 22 2009 @ 05:28 AM