home *** CD-ROM | disk | FTP | other *** search
/ Phoenix CD 2.0 / Phoenix_CD.cdr / 24b / keyboard.zip / KBFIX2.DOC < prev    next >
Text File  |  1986-06-22  |  21KB  |  592 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                    KBFIX2.COM       VERSION 3.0     June 22, 1986
  8.  
  9.  
  10.                               Copyright (C) 1985, 1986
  11.                                     Skip Gilbrech
  12.  
  13.                    ----------------------------------------------
  14.                    This program is intended for public-domain use
  15.                        It must not be sold under any condition
  16.                    ----------------------------------------------
  17.  
  18.                                     INTRODUCTION
  19.  
  20.           KBFIX2.COM is a resident program for the IBM PC, AT, and
  21.           compatibles which contains several keyboard enhancements which I
  22.           and many others have found extremely useful.  Most of these
  23.           enhancements can be found in one or another public-domain or
  24.           commercial program, but they tend to be grouped together with
  25.           other features which you may or may not want, and which often
  26.           can't be shut off.  KBFIX2 was written to be as compatible as
  27.           possible with other programs, and as flexible as possible in
  28.           terms of options:  all its features can be enabled or disabled at
  29.           any time from the dos command line.
  30.  
  31.           Version 3.0 contains several enhancements and bug fixes to the
  32.           last released version (2.3).  Many of the changes were suggested
  33.           by users of the program.  I apologize for not replying personally
  34.           to each suggestion, but everyone who wrote me, and whose address
  35.           I can find, will receive a copy of this update.
  36.  
  37.           Changes which affect command line parameters or program use are
  38.           marked in the left margin with '|'.  See the end of this document
  39.           for a change summary.
  40.  
  41.                                   USING THE PROGRAM
  42.  
  43.           KBFIX2 can be invoked from the command line or from within a
  44.           batch file.  The first time the program is invoked it loads
  45.           itself into memory (takes up about 2-1/2 K); it will then remain
  46.           resident until the system is rebooted, or until it is removed
  47.           from memory with the /K option.  The current configuration of
  48.           KBFIX2 is selected by means of the command line options outlined
  49.           below, any or all of which can be changed at any time.  When the
  50.           program starts up, it tries to find its loaded image in memory;
  51.           if the image is found, all options currently in effect are copied
  52.           to a local buffer where they are used as defaults, and all
  53.           changes will be made to the memory-resident image.  KBFIX2 will
  54.           never knowingly load more than one copy of itself into memory, so
  55.           if you ever see the 'Initial Installation' message after KBFIX2
  56.           has once been loaded, please reboot and let me know about it.
  57.  
  58.  
  59.  
  60.                                        -- 1 --
  61.  
  62.  
  63.  
  64.  
  65.  
  66.                    KBFIX2.COM       VERSION 3.0     June 22, 1986
  67.  
  68.  
  69.           Options can be entered separately or in groups.  Each option or
  70.           group must be preceded by '-' or '/', and must be separated from
  71.           other groups by at least one space or tab.  There must be no
  72.           spaces within groups.  To enable or disable an 'on/off' option,
  73.           follow the letter(s) with 1 or 0.
  74.  
  75.           OPTION                                             DEFAULT
  76.           ------                                             -------
  77.  
  78.           KB --  use extended Keyboard Buffer                Enabled
  79.  
  80.           Enabling this option activates the 127-character keyboard buffer. 
  81.           It also allows KBFIX2 to check for the special characters Ctrl-C,
  82.           Ctrl-S, and Ctrl-P, which are normally only recognized by DOS if
  83.           they appear at the beginning of the keyboard buffer.  If any one
  84.           of these characters is typed while KBFIX2's buffer is active, the
  85.           buffer will be cleared, and the character typed will be placed at
  86.           its head.
  87.  
  88.           KT --  adjust Typematic action of Keys             Disabled
  89.  
  90.           Enabling this option allows adjusting the speed of typematic key
  91.           repeating;  disabling it returns typematic action to normal.  The
  92.           options below that start with 'KT' will retain their settings
  93.           even if typematic is disabled, so it's not necessary to reenter
  94.           them if it becomes necessary to shut off typematic temporarily.
  95.  
  96.           KTD -- Ticks to Delay before starting (0-99)       6
  97.  
  98.           Sets the number of timer ticks which will occur before typematic
  99.           repeating begins.  Timer ticks happen approximately once every
  100.           1/18th second, so if this number is larger than about 9, the only
  101.           effect it will have is a speedup of the typematic rate of an
  102.           already repeating key, since normal typematic action seems to
  103.           start (on an IBM-PC, at least) about one-half second after the
  104.           key is first pressed.  Personally I find a setting of 5 or 6
  105.           about right.
  106.  
  107.           KTR -- Ticks between key Repeats (0-99)            0
  108.  
  109.           Sets the number of timer ticks which will occur between repeats
  110.           of the currently-pressed key.  Setting this option to zero
  111.           results in 18 repeats per second.  These repeats are in addition
  112.           to the normal typematic repeats produced by the keyboard, so the
  113.           effective rate of repeating will be considerably higher than the
  114.           setting of this option would otherwise indicate.
  115.  
  116.  
  117.  
  118.  
  119.                                        -- 2 --
  120.  
  121.  
  122.  
  123.  
  124.  
  125.                    KBFIX2.COM       VERSION 3.0     June 22, 1986
  126.  
  127.  
  128.           OPTION                                             DEFAULT
  129.           ------                                             -------
  130.  
  131.           KTN -- Num. chars. inserted each repeat (1-10)     1
  132.  
  133.           Determines how many copies of the currently repeating keycode to
  134.           place into the keyboard buffer each time the key is repeated. 
  135.           Fine tuning of the effective typematic rate is possible by
  136.           experimenting with various combinations of this setting and the
  137.           KTR setting above.
  138.  
  139.           F   -- Fix caps-lock reverse character shift       Always
  140.  
  141.           Tells KBFIX2 whether or not to fix the annoying 'reverse-shift'
  142.           which occurs when caps-lock is on and a shift key is pressed. 
  143.           When I have caps-lock on, it's generally because I want capital
  144.           letters to appear on the screen, and that's what will happen when
  145.           this option is enabled.
  146.  
  147.         | This option has changed in Version 3.0.  The default setting
  148.         | (nothing entered on the command line) will act as before, but
  149.         | following the 'F' with '1' causes caps-lock to act more like
  150.         | caps-lock on a typewriter:  The first time a shift key is pressed
  151.         | along with any alphabetic character when caps-lock is on, the
  152.         | alphabetic character will be capitalized.  Caps-lock will then be
  153.         | turned off.  This feature is easier to try than to describe, and
  154.         | if you don't like it, either enter nothing for this option or
  155.         | follow the 'F' with '2', and the reverse-shift-fix will act as it
  156.         | always has.
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.                                        -- 3 --
  179.  
  180.  
  181.  
  182.  
  183.  
  184.                    KBFIX2.COM       VERSION 3.0     June 22, 1986
  185.  
  186.  
  187.           OPTION                                             DEFAULT
  188.           ------                                             -------
  189.  
  190.           D   -- Display state of locking keys               Enabled
  191.  
  192.           Enabling this option results in an on-screen display of the state
  193.           of the caps-lock, num-lock, and scroll-lock toggles.
  194.  
  195.         | This display has changed somewhat in Version 3.0:  The lock flags
  196.         | are now shown by printing the appropriate character (C, N, or S)
  197.         | with an attribute constructed by reversing the foreground and
  198.         | background attributes of whatever is currently displayed on the
  199.         | screen.  In addition, the current character is saved and replaced
  200.         | if possible when the locking key is toggled off.  Previously, a
  201.         | blanking character was always inserted when a key was not
  202.         | toggled; now, the screen is not disturbed at all.  These changes
  203.         | result in less disturbance to screen displays, particularly if
  204.         | color is being used, and reduce the system overhead slightly if
  205.         | the timer update option is in effect.  It is possible for the
  206.         | algorithm used to become confused under certain circumstances,
  207.         | but the condition will generally correct itself when the screen
  208.         | is changed in a different program, etc.  Display of locking flags
  209.         | is now disabled during graphics mode operations.
  210.  
  211.           C   -- starting Column for display (0-77)          77
  212.  
  213.           Sets the starting screen column for the 3-character flag display.
  214.  
  215.           R   -- Row for display (0-24)                      0
  216.  
  217.           Sets the row for the flag display.  If the row setting is other
  218.           than 0, the flags will 'clone' themselves whenever the screen is
  219.           scrolled.
  220.  
  221.         | W   -- Wait for Retrace on color display           Enabled
  222.  
  223.         | Disable this option if you have a color card (EGA, etc.) that
  224.         | doesn't produce 'snow' on the monitor.  Those using a standard
  225.         | IBM color graphics board should leave the option enabled.
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.                                        -- 4 --
  238.  
  239.  
  240.  
  241.  
  242.  
  243.                    KBFIX2.COM       VERSION 3.0     June 22, 1986
  244.  
  245.  
  246.           OPTION                                             DEFAULT
  247.           ------                                             -------
  248.  
  249.           T   -- use Timer interrupt to update display       Disabled
  250.  
  251.           Enabling this option tells KBFIX2 to update the flag display 18
  252.           times per second by using the timer interrupt; disabling it means
  253.           the flags will only be updated whenever a key is pressed.  Use of
  254.           this feature allows the flags to be seen in programs which would
  255.           otherwise overwrite them between key presses, but it also slows
  256.           down the entire system slightly due to the overhead involved in
  257.           writing to the screen.  The slow-down seems to be less than one
  258.           percent, though, even when using a color monitor.  This option
  259.           has no effect unless the D option above is also enabled.
  260.  
  261.           B   -- Beep when locking keys are toggled          Enabled
  262.  
  263.           Determines whether the bell will sound whenever the state of one
  264.           of the toggling keys changes.  If this option is enabled, the
  265.           machine will beep from low to high whenever a toggle changes from
  266.           off to on, and from high to low whenever a toggle changes from on
  267.           to off.
  268.  
  269.         | In Version 3.0, you can follow the 'B' with a ratio (n:n) to
  270.         | control the pitch of the beeps.  This is useful when running
  271.         | KBFIX2 on faster machines like the AT, etc.  Entering B2:3, for
  272.         | example, results in a pitch which is 2/3 of normal, which should
  273.         | sound about right on an AT.  Numbers from 1 to 9 can be used; if
  274.         | the second value is missing, it is assumed to be '1'.
  275.  
  276.           S   -- Scroll lock pause control                   Disabled
  277.  
  278.           Enabling this option will make KBFIX2 enter a loop whenever the
  279.           scroll-lock key is pressed.  The loop will cause screen output,
  280.           and any other non interrupt-driven activity, to pause until the
  281.           next time scroll-lock is pressed (either by itself, or at the
  282.           same time as shift key).  The scroll-lock key can always be used
  283.           normally (to shift the scroll-state) by holding a shift key
  284.           (Right/Left Shift or Alt) down at the same time.  If the D option
  285.           is enabled, a blinking S will be displayed while the pause is in
  286.           effect.
  287.  
  288.         | In Version 3.0, the blinking 'S' is displayed to the left of the
  289.         | other lock flags to avoid confusion with the normal scroll-lock
  290.         | flag.
  291.  
  292.  
  293.  
  294.  
  295.  
  296.                                        -- 5 --
  297.  
  298.  
  299.  
  300.  
  301.  
  302.                    KBFIX2.COM       VERSION 3.0     June 22, 1986
  303.  
  304.  
  305.           OPTION                                             DEFAULT
  306.           ------                                             -------
  307.  
  308.           V   -- Verbose display of current settings         Enabled
  309.  
  310.           Disabling this option prevents KBFIX2 from presenting its normal
  311.           display of current settings.  To have any effect, this option
  312.           must be specified each time KBFIX2 is invoked.
  313.  
  314.         | K   -- Kill KBFIX2 (remove from memory)
  315.  
  316.         | Entering /K on the command line causes KBFIX2 to remove itself
  317.         | from memory if possible.  This command should be used carefully
  318.         | since it can result in memory 'holes' if KBFIX2 isn't the last
  319.         | resident program installed.  If KBFIX2's interrupt vectors have
  320.         | been modified by another program, this command will fail, since
  321.         | removing the program from memory in such a situation is almost
  322.         | certain to lead to a system crash.
  323.  
  324.             -----------------------------------------------------------
  325.  
  326.           Command Line Example:
  327.  
  328.              KBFIX2 /F0 /KT1 /KTD5 /D1 /T1 /C50 /R0 /B0 /V0
  329.  
  330.           disables the caps-lock fix, enables typematic adjustment, sets
  331.           the typematic delay (before starting to repeat a pressed key) to
  332.           5 ticks (5/18ths of a second), enables the key-state display and
  333.           timer update, sets the display column and row to 50/0, disables
  334.           toggle beeps, and tells KBFIX2 not to display its current
  335.           settings.
  336.  
  337.           To avoid having to remember all this, enter your normal para-
  338.           meters in AUTOEXEC.BAT or in some other convenient batch file.
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.                                        -- 6 --
  356.  
  357.  
  358.  
  359.  
  360.  
  361.                    KBFIX2.COM       VERSION 3.0     June 22, 1986
  362.  
  363.                                HARDWARE COMPATIBILITY
  364.  
  365.           KBFIX2 should run on any IBM-PC, XT, or AT, and on most close
  366.           compatibles.  Following are some of the assumptions it makes
  367.           about the hardware:
  368.  
  369.           1) The screen memory starts at B000H (monochrome), and B800H
  370.           (color); screen-related bios data locations are identical to
  371.           those on the IBM-PC.
  372.  
  373.           2) The keyboard buffer starts at 40:1E and is organized like the
  374.           standard IBM-PC buffer.
  375.  
  376.           3) The base port address of the 8259 interrupt controller is 20H;
  377.           the timer interrupt is on IRQ0, set up as interrupt 8;
  378.           the keyboard interrupt is on IRQ1 and is interrupt 9.  
  379.  
  380.           4) The base keyboard port address is 60H.
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.                                        -- 7 --
  415.  
  416.  
  417.  
  418.  
  419.  
  420.                    KBFIX2.COM       VERSION 3.0     June 22, 1986
  421.  
  422.  
  423.                                SOFTWARE COMPATIBILITY
  424.  
  425.           No program that deals with the hardware and system software on
  426.           this level can hope to be compatible with everything else. 
  427.           KBFIX2 appears to work perfectly well with Sidekick, Dosedit,
  428.           Prokey, Util (which places characters directly in the buffer),
  429.           and every other program I've tried so far.  It also works well
  430.           with Fansi-Console (replacement for Ansi.sys) if KBFIX2's buffer
  431.           option is disabled, since Fansi provides its own enlarged
  432.           keyboard buffer.
  433.  
  434.           I can offer, however, absolutely no guarantees.  I would like to
  435.           be informed, though, at the address below, of any incompatibil-
  436.           ities found, so I can try to determine whether the incompatibil-
  437.           ity results from a problem within KBFIX2.  Before you decide that
  438.           KBFIX2 is incompatible with something, by the way, try varying
  439.           loading order, removing other resident programs, changing op-
  440.           tions, etc.  I've tried to give KBFIX2 as 'low a profile' as
  441.           possible.  What I mean by that is that the interrupt handlers in
  442.           KBFIX2 always pass control to whatever was there before, without
  443.           changing the machine state at all.  That feature is useful,
  444.           though, only when KBFIX2 is loaded last in the chain of interrupt
  445.           handlers.  KBFIX2 constantly checks the keyboard buffer to deter-
  446.           mine whether another program has changed it, and if so, it defers
  447.           to that program, resets its own buffer and variables, and uses
  448.           the current buffer condition as a starting point for further
  449.           processing.  KBFIX2 cannot, however, control what other programs
  450.           do.
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.                                        -- 8 --
  474.  
  475.  
  476.  
  477.  
  478.  
  479.                    KBFIX2.COM       VERSION 3.0     June 22, 1986
  480.  
  481.  
  482.                                        CHANGES
  483.  
  484.         | V3.0 (05/31/86):  Fixed bug which caused repeated beeping when a
  485.         | key state was toggled by another program (i.e., not from the
  486.         | keyboard).
  487.  
  488.         | Moved keyboard buffer to occupy the PSP after 5CH to save some
  489.         | memory.
  490.  
  491.         | Changed '/b' parameter to take an optional ratio to vary the
  492.         | pitch & duration of all beeps for faster machines (AT, etc.)
  493.         | Ratio is expressed as /bn:n where 1:2 makes things half as fast,
  494.         | 3:4 makes them 3/4 as fast, etc.
  495.  
  496.         | Exit code returned to system if dos 2.0 or above.
  497.  
  498.         | Option ('/k') to remove program from memory if vectors haven't
  499.         | been modified.
  500.  
  501.         | V2.9 (05/13/86):  Changed key state display to reverse colors it
  502.         | finds on the screen when showing a locked state, and to update
  503.         | the screen only when necessary.  Also added check for graphic
  504.         | mode -- key state display is now disabled in this mode.
  505.  
  506.         | V2.8 (04/26/86):  Modified timer handler to use hardware timer
  507.         | interrupt and do its work after calling the 'real' handler. 
  508.         | Since an EOI will have been sent to the 8259 at this point, it's
  509.         | no longer necessary to set special mask mode to enable lower
  510.         | priority interrupts, which should solve some reported
  511.         | compatibility problems with Tallgrass hard disks.
  512.  
  513.         | V2.7 (03/06/86):  Added option (/W0) to disable wait-for-retrace
  514.         | on color display.  Fixed Ctrl-Break problem causing slow
  515.         | typematic until buffer had wrapped.
  516.  
  517.         | V2.6 (02/11/86):  Added option (/F2) to turn off caps-lock the
  518.         | first time an alpha key is pressed along with a shift key.
  519.  
  520.         | V2.5 (02/06/86):  Fix AT reverse caps-lock shift problem.
  521.  
  522.         | V2.4 (08/13/85):  Tied beep to timer handler -- if both enabled,
  523.         | beep will sound whenever locking key status changes, even if
  524.         | change not done through keyboard.
  525.  
  526.           **** LAST RELEASED VERSION ****
  527.  
  528.           V2.3 (6/18/85):  Fixed bug which resulted in the scroll-lock key
  529.           behaving like a typematic key.
  530.  
  531.  
  532.                                        -- 9 --
  533.  
  534.  
  535.  
  536.  
  537.  
  538.                    KBFIX2.COM       VERSION 3.0     June 22, 1986
  539.  
  540.  
  541.           V2.2 (3/31/85):  Fixed bug in buffer logic which put the wrong
  542.           character in the bios keyboard buffer when the extended buffer
  543.           option was in effect, and characters were being typed slightly
  544.           faster than they were removed from the buffer (thanks to Dave
  545.           Rothman and Chris Dunford for reporting this).
  546.  
  547.           Changed format of current options display to be consistent with
  548.           actual setting of command-line switches (thanks to Earle Robinson
  549.           for the suggestion).
  550.  
  551.           Changed scroll-lock pause to release only when the scroll-lock
  552.           key is pressed again.  If the status display is active, a
  553.           blinking S will display while the pause is in effect.
  554.  
  555.           V2.1 (3/18/85):  Added scroll-lock pause feature ('s' option).
  556.  
  557.           V2.0 (3/16/85):  Original version.
  558.  
  559.           Please direct all questions, suggestions and problem reports to:
  560.  
  561.           Skip Gilbrech
  562.           90 Lexington Ave. #10-G
  563.           New York, NY 10016
  564.           Compuserve: 71445,534 (messages left on IBMSW SIG preferred) 
  565.  
  566.           This program is in the public domain.  Anyone is welcome to use
  567.           it and pass it along as they like.  Contributions are definitely
  568.           NOT solicited, but then again, I'm not about to return checks
  569.           from grateful users...
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.                                       -- 10 --
  592.