home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / os2nloff.zip / NLOFF.DOC < prev    next >
Text File  |  1988-07-04  |  3KB  |  79 lines

  1.                 Documentation for NLOFF.EXE
  2.                 ---------------------------
  3.  
  4. NLOFF.EXE is an OS/2 utility to turn off the NUMLOCK key on IBM PS/2s
  5. (and other machines that default to having it on) on the Enhanced
  6. Keyboard.  It is run as part of the boot-up procedures.
  7.  
  8. The following are quotes from Charles Petzold, direct from
  9. Compuserve, explaining it's use, and giving me permission to compile
  10. it and distribute it.
  11.  
  12. If you have access to Compuserve, and are interested in programming
  13. in general, and OS/2 programming in particular, I recommend you check
  14. out the Programming Forum in PCMagNet.  It's worth the trip!
  15.  
  16. Joe Salemi
  17.  
  18.  
  19. ======================================================================
  20.  
  21.  
  22. #: 3034 S2/Environments [P]
  23.     27-Jun-88  23:47:47
  24. Sb: #3029-#Gonzo Programming
  25. Fm: Charles Petzold [PCMAG] 72241,56
  26. To: Harve Schiffman 72261,347
  27.  
  28. A parody?  That's an interesting theory.  I don't know how Ted Mirecki
  29. feels about OS/2, but presenting a 150 line program to turn off the
  30. Num Lock key does little to encourage potential OS/2 programmers.
  31.  
  32. What's worse is that the device driver approach is *totally*
  33. unnecessary.  To turn the Num Lock key before the Program Selector
  34. loads, you can use this NLOFF.C program:
  35.  
  36.      #define INCL_KBD
  37.      #include <os2.h>
  38.      #include <process.h>
  39.  
  40.      int main (int argc, char *argv[])
  41.           {
  42.           static KBDINFO kbst = { 10, 0x10, 0, 0, 0 } ;
  43.  
  44.           KbdSetStatus (&kbst, 0) ;
  45.           spawnv (P_NOWAIT, argv[1], argv + 1) ;
  46.           return 0 ;
  47.           }
  48.  
  49. In your CONFIG.SYS file, change the PROTSHELL statement from:
  50.  
  51.      PROTSHELL = ....
  52.  
  53. to:
  54.      PROTSHELL = [path] NLOFF.EXE ....
  55.  
  56. I don't know if this qualifies as "gonzo programming" but it's
  57. certainly a more rational approach, don't you think?
  58.  
  59. ======================================================================
  60.  
  61. #: 3289 S2/Environments [P]
  62.     02-Jul-88  03:36:55
  63. Sb: #3278-Gonzo Programming
  64. Fm: Charles Petzold [PCMAG] 72241,56
  65. To: Joe Salemi 71121,3273
  66.  
  67. I have no problem with launching NLOFF.C out into the public domain. 
  68. Put my name in the comment area on top (if it isn't there already). 
  69. Just a "Programmed by..." will do.  Also, the comment field should
  70. include directions for how to using it in CONFIG.SYS (or CONFIG.OS2
  71. for the dual boot version!!!).
  72.  
  73. And, most importantly, the comment field should indicate that this
  74. program is a better approach to turning off the Num Lock key at boot
  75. time than Ted Mirecki's device driver in the July PC Tech Journal. 
  76. (Hee, hee, hee.)
  77.  
  78.  
  79.