home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / S12518.ZIP / KBDDEFS.H < prev    next >
Text File  |  1989-07-18  |  1KB  |  35 lines

  1. /* kbddefs.h RHS 7/15/89
  2.  *
  3.  * macros and definitions to simplify keyboard handling
  4.  */
  5.  
  6. #define    LEFTSHIFT                0x0002
  7. #define    LEFTCTRL                    0x0100
  8. #define    LEFTALT                    0x0200
  9. #define    CAPS                        0x0040
  10. #define    INSERT                    0x0080
  11. #define    SYSREQ                    0x8000
  12. #define    RIGHTALT                    0x0800
  13. #define    RIGHTCTRL                0x0400
  14. #define    RIGHTSHIFT                0x0001
  15. #define    ECHO                        0x0001
  16. #define    RAW                        0x0004
  17. #define    COOKED                    0x0008
  18.  
  19. #define    KbdLeftShift(info)        (info.fsState &    LEFTSHIFT)
  20. #define    KbdLeftCtrl(info)        (info.fsState &    LEFTCTRL)
  21. #define    KbdLeftAlt(info)        (info.fsState &    LEFTALT)
  22. #define    KbdCapsL(info)            (info.fsState &    CAPS)
  23. #define    KbdNumL(info)            (info.fsState &    NUMLOCK)
  24. #define    KbdScrLock(info)        (info.fsState &    SCROLLLOCK)
  25. #define    KbdInsert(info)            (info.fsState &    INSERT)
  26. #define    KbdSysReq(info)            (info.fsState &    SYSREQ)
  27. #define    KbdRightAlt(info)        (info.fsState &    RIGHTALT)
  28. #define    KbdRightCtrl(info)        (info.fsState &    RIGHTCTRL)
  29. #define    KbdRightShift(info)        (info.fsState &    RIGHTSHIFT)
  30.  
  31. #define    KbdEcho(info)            (info.fsMask & ECHO)
  32. #define    KbdMode(info)            (info.fsMask & RAW)
  33.  
  34.  
  35.