home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / pc_hw / kb / getkey.txh < prev    next >
Encoding:
Text File  |  1995-07-10  |  545 b   |  32 lines

  1. @node getkey, bios
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <pc.h>
  6. #include <keys.h>
  7.  
  8. int getkey(void);
  9. @end example
  10.  
  11. @subheading Description
  12.  
  13. Waits for the user to press one key, then returns that key.  Alt-key
  14. combinations have 0x100 added to them.  Extended keys return their
  15. non-extended codes. 
  16.  
  17. The file @file{keys.h} has symbolic names for many of the keys.
  18.  
  19. @xref{getxkey}.
  20.  
  21. @subheading Return Value
  22.  
  23. The key pressed.
  24.  
  25. @subheading Example
  26.  
  27. @example
  28. while (getkey() != K_Alt_3)
  29.   do_something();
  30. @end example
  31.  
  32.