Microsoft KB Archive/77835

= FIXSHIFT.COM Requires /I to Install; Detailed Explanation =

Article ID: 77835

Article Last Modified on 11/21/2006



This article was previously published under Q77835



SUMMARY
FIXSHIFT.COM is a terminate-and-stay-resident (TSR) program that corrects a BIOS problem that may be present in some vendors' hardware, including Compaq.

FIXSHIFT.COM modifies the scan codes returned for the SHIFT keys to correctly maintain the shift states.

To install FIXSHIFT.COM, you must use the /I switch. For example:   fixshift /i This information applies to FIXSHIFT.COM supplied with the following Microsoft products:

Basic Professional Development System (PDS) versions 7.0 and 7.1

QuickBasic versions 4.0, 4.0b, and 4.5 for MS-DOS

Basic Compiler versions 6.0 and 6.0b for MS-DOS

C versions 5.1, 6.0, and 6.0a for MS-DOS

COBOL 3.0 and 3.0a for MS-DOS

FORTRAN versions 4.1, 5.0, and 5.1 for MS-DOS

QuickC versions 1.01, 2.0, 2.5, and 2.51 for MS-DOS



MORE INFORMATION
FIXSHIFT.COM corrects a problem in Compaq and possibly other hardware vendors' BIOS that causes the SHIFT states to be maintained incorrectly when using a 101-key keyboard.

The 101-key keyboard generates &quot;false&quot; key up/down strokes for the left and right SHIFT keys to simulate the original keyboard that did not have as many keys. Many BIOSs handle these &quot;false&quot; keystrokes correctly, but some do not. The problem BIOSs read the &quot;false&quot; keystrokes as changes to the state of the real SHIFT keys, so it is impossible for an application program to know when the real shift keys are down.

To solve this problem, FIXSHIFT.COM maintains two sets of state information for the SHIFT keys. One state is the real state of the SHIFT keys, and the other is the combination of the real and the false SHIFT key transitions (up/down). When a real SHIFT key transition is detected, both the real and the combined shift states are updated; when a false transition is detected (false transitions are always preceded by a special code), only the combined state is updated.

FIXSHIFT.COM hooks the keyboard interrupt to maintain the shift states. When FIXSHIFT.COM gets a keyboard interrupt, it first sets the BIOS shift state (a documented memory location) to what the BIOS expects (the combined real and fake shift states). FIXSHIFT then passes on the interrupt to the interrupt handler that was servicing the keyboard interrupt before FIXSHIFT revectored that interrupt. The BIOS is unaware that FIXSHIFT.COM has done anything, because its shift states are the same as if this program were not present. When the BIOSs interrupt handler returns, FIXSHIFT sets the BIOSs shift state to the real shift states, so when an application looks at this, it will reflect the true state of the SHIFT keys.

If FIXSHIFT.COM is executed without any command line parameters, it tests the machine to see if FIXSHIFT is required. First it checks if a 101-key keyboard is attached to the machine; if not, FIXSHIFT is not required. It then checks if the BIOS bug is present by turning on NUM LOCK and asking the user to type a down arrow using the dedicated down arrow key (not the DOWN ARROW on the numeric keypad). If the shift states say that the left SHIFT key is down, then the BIOS has the bug. Pressing the down arrow while NUM LOCK is on generates a fake left shift down that the problem BIOS will record in the shift states. Regardless of the outcome of this test, FIXSHIFT.COM will not install unless you invoke it with the /I command line option.

Additional query words: QuickBas BasicCom 2.00 2.50 3.00 3.00a 4.00 4.00b 4.50 4.10 5.00 5.10 6.00a 6.00 6.00B 7.00 7.10

Keywords: KB77835

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.