home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / KBSPEEDU.ZIP / SPEED.C next >
C/C++ Source or Header  |  1990-04-11  |  668b  |  36 lines

  1. /******************************************************************************
  2. *
  3. * speed.exe, kick the keyboard in the butt!
  4. *
  5. * TIm Purves, MichTron Inc 04/10/90
  6. *****************************************************************************/
  7.  
  8. #define INCL_DOSDEVICES
  9. #define INCL_SUB
  10. #define INCL_DOS
  11. #include <os2.h>
  12.  
  13. struct _f54Info
  14. {
  15.     unsigned DelayMS;
  16.     unsigned RepeatRate;
  17. };
  18.  
  19.  
  20. main()
  21. {
  22.     struct _f54Info f54Info;
  23.     HFILE handle;
  24.     unsigned action;
  25.  
  26.     if(!DosOpen("KBD$",&handle,&action,0L,0,1,0x42,0L))
  27.         {
  28.         f54Info.DelayMS = 250;
  29.         f54Info.RepeatRate = 30;
  30.         DosDevIOCtl(0L,&f54Info,0x54,4,handle);
  31.         DosClose(handle);
  32.         }
  33. }
  34.  
  35.     
  36.