Microsoft KB Archive/71511

= Programs to Turn CAPS LOCK Key Off or On =

Article ID: 71511

Article Last Modified on 5/12/2003

-

APPLIES TO


 * Microsoft MS-DOS 3.1
 * Microsoft MS-DOS 3.2 Standard Edition
 * Microsoft MS-DOS 3.21 Standard Edition
 * Microsoft MS-DOS 3.3 Standard Edition
 * Microsoft MS-DOS 3.3a
 * Microsoft MS-DOS 4.0 Standard Edition
 * Microsoft MS-DOS 4.01 Standard Edition
 * Microsoft MS-DOS 5.0 Standard Edition
 * Microsoft MS-DOS 5.0a
 * Microsoft MS-DOS 6.0 Standard Edition
 * Microsoft MS-DOS 6.2 Standard Edition
 * Microsoft MS-DOS 6.21 Standard Edition
 * Microsoft MS-DOS 6.22 Standard Edition

-



This article was previously published under Q71511



SUMMARY
You can use the MS-DOS DEBUG utility to create a program (CAPS_ON.COM) that turns on the CAPS LOCK key. (Note: You can modify CAPS_ON.COM to turn CAPS LOCK off; see the instructions following the steps for creation of CAPS_ON.COM.)



MORE INFORMATION
Follow the steps below to create CAPS_ON.COM:  Create a DEBUG script file (CAPS_ON.SCR) using a text editor such as the MS-DOS EDLIN line editor. (See the &quot;Microsoft MS-DOS User's Guide&quot; for more information on EDLIN.) The CAPS_ON.SCR file must contain the following lines exactly (where  means to press the ENTER key on the keyboard):

a 100

mov ax,0040

mov ds,ax

or byte ptr [0017],40

mov ax,4c00

int 21



r cx

000f

n caps_on.com

w<ENTER>

q<ENTER>

</li> <li>Redirect this script file into the DEBUG utility by entering the following command at the DOS prompt:

C:\>debug < caps_on.scr

</li> <li>The CAPS_ON.COM program has now been created. To test the program, turn off the CAPS LOCK key, then call the CAPS_ON.COM program by entering the following command:

C:\>caps_on.com

This should result in the CAPS LOCK indicator light coming on just as if you had pressed the CAPS LOCK key.</li></ol>

This program can be modified to turn CAPS LOCK off rather than on. To do this, follow the steps in the example above, replacing all instances of &quot;CAPS_ON&quot; with &quot;CAPS_OFF&quot; and substituting the following line for the fourth line of the DEBUG script file:

and byte ptr [0017],bf<ENTER>

Additional query words: 6.22 3.20 3.21 3.30 3.30a 4.00 4.01 5.00 5.00a 6.00 6.20

Keywords: KB71511

-

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

© Microsoft Corporation. All rights reserved.