home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / SWAPDCP.LZH / swapdcp.doc < prev    next >
Text File  |  1992-06-13  |  2KB  |  43 lines

  1. SWAPDCP -- list and/or swap keys in a KEYBOARD.DCP file (6/23/92)
  2. (C) 1992 Ned Konz -- FREELY DISTRIBUTABLE AND USABLE
  3.  
  4. MAKE A COPY OF YOUR KEYBOARD.DCP FILE TO RUN THIS PROGRAM ON!!!
  5. THIS WILL EDIT THE GIVEN FILE IN PLACE!!!
  6.  
  7. BIX: nkonz, CI$: 76046,223
  8.  
  9. Usage: SWAPDCP [-l n] [-s k1 k2 [...]] [-h] filename.DCP
  10.    -l n         sets listing level to n ( 0-3 )
  11.                 0: no listing output
  12.                 1: basic info, status output (default)
  13.                 2: level 1 plus table headers
  14.                 3: level 2 plus key entries
  15.    -s k1 k2     swaps keys with scan codes k1 and k2
  16.                 (multiple -s arguments are processed in order)
  17.    -h           prints extended help to standard output and quits
  18.                 (run as "SWAPDCP -h | more" or "SWAPDCP -h >file")
  19.  
  20. For instance, to swap the control and caps-lock keys on your keyboard,
  21. you might use (assuming OS/2 is on your drive C:):
  22.  
  23.     COPY C:\OS2\KEYBOARD.DCP C:\OS2\MYKBD.DCP
  24.     SWAPDCP -s 29 58 C:\OS2\MYKBD.DCP
  25.  
  26. This swaps the key definitions in-place.
  27.  
  28. You could then change the line in your CONFIG.SYS which goes something like:
  29.     DEVINFO=KBD,US,C:\OS2\KEYBOARD.DCP
  30. to:
  31.     DEVINFO=KBD,US,C:\OS2\MYKBD.DCP
  32.  
  33. The next time you start up, your keys will be changed.
  34.  
  35. To understand the output of the program, you should read the Physical Device
  36. Driver manual in the section "Keyboard IOCtls" about function 0x50 - Set
  37. Code Page.
  38.  
  39. To get the ID of the scan codes, you could use a PC tech ref manual,
  40. or run the program with the "-l 3" option to produce a full key listing.
  41.  
  42. I figured out the layout of the .DCP file myself.
  43.