home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / snpd9707.zip / SNIPKBIO.H < prev    next >
C/C++ Source or Header  |  1997-07-05  |  2KB  |  57 lines

  1. .I 0 4
  2. /* +++Date last modified: 05-Jul-1997 */
  3.  
  4. /*
  5. **    SNIPKBIO.H - Snippets header file for keyboard I/O function
  6. .D 1 4
  7. .I 17 31
  8. int  ungetkey(unsigned short key);                    /* Kb_Stuff.C     */
  9. int  KB_stuff(char *str);                             /* Kb_Stuff.C     */
  10.  
  11. int  IsLeftShift(void);                               /* Isshift.C      */
  12. int  IsRightShift(void);                              /* Isshift.C      */
  13. int  IsShift(void);                                   /* Isshift.C      */
  14.  
  15. int  IsLeftAlt(void);                                 /* Isshift.C      */
  16. int  IsRightAlt(void);                                /* Isshift.C      */
  17. int  IsAlt(void);                                     /* Isshift.C      */
  18.  
  19. int  IsLeftCtl(void);                                 /* Isshift.C      */
  20. int  IsRightCtl(void);                                /* Isshift.C      */
  21. int  IsCtl(void);                                     /* Isshift.C      */
  22.  
  23. int  IsSysRq(void);                                   /* Isshift.C      */
  24. int  timed_getch(int n_seconds);                      /* Timegetc.C     */
  25. int  isxkeybrd(void);                                 /* Isxkbrd.C      */
  26. void setcaps(void);                                   /* Keylocks.C     */
  27. void clrcaps(void);                                   /* Keylocks.C     */
  28. void setnumlock(void);                                /* Keylocks.C     */
  29. void clrnumlock(void);                                /* Keylocks.C     */
  30.  
  31. #define     RIGHT_SHIFT       0x0001
  32. #define     LEFT_SHIFT        0x0002
  33.  
  34. #define     EITHER_ALT        0x0008
  35. #define     LEFT_ALT          0x0200
  36.  
  37. #define     EITHER_CTL        0x0004
  38. #define     LEFT_CTL          0x0100
  39. .D 18 28
  40. .I 47 3
  41.  #define    SYSRQ             0x8000
  42. #else /* assume DOS */
  43.  #define    SYSRQ             0x0400
  44. .D 48 3
  45. .I 64 1
  46. ** key is held, like DOS does.      All the information about a keystroke is
  47. .D 65 1
  48. .I 73 7
  49. extern KBDKEYINFO ki;         /* Holds key info - defined in ISSHIFT.C */
  50.  
  51.  #define peekkey()      (&ki.fsState)
  52. #else /* !__OS2__ */
  53.  #define key_seg  0x40
  54.  #define key_off  0x17
  55.  #define peekkey()      ((unsigned short FAR*) MK_FP(key_seg, key_off))
  56. .D 74 7
  57.