home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / ATKEY.ZIP / ATKEY.C < prev    next >
C/C++ Source or Header  |  1988-08-16  |  446b  |  24 lines

  1. /*
  2.  * program to turn NUMLOCK off
  3.  *
  4.  */
  5.  
  6. #define INCL_SUB
  7.  
  8. #include <os2def.h>
  9. #include <bsesub.h>
  10.  
  11. main ()
  12. {
  13.     KBDINFO kbdstatus;
  14.     
  15.     kbdstatus.cb = sizeof(kbdstatus);
  16.     KbdGetStatus(&kbdstatus, 0);
  17.  
  18.     if (kbdstatus.fsState & 0x0020) {
  19.     kbdstatus.fsMask = 0x0010;     /* fsState is to be modified */
  20.     kbdstatus.fsState ^= 0x0020;     /* set NumLock bit off */
  21.     KbdSetStatus(&kbdstatus, 0);     /* set new state */
  22.     }
  23. }
  24.