This article was previously published under Q71511
Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
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 turnCAPS LOCK off; see the instructions following the steps for creation ofCAPS_ON.COM.)
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 "Microsoft MS-DOS User's Guide" for more information on EDLIN.) The CAPS_ON.SCR file must contain the following lines exactly (where <ENTER> means to press the ENTER key on the keyboard):
a 100<ENTER> mov ax,0040<ENTER> mov ds,ax<ENTER> or byte ptr ,40<ENTER> mov ax,4c00<ENTER> int 21<ENTER> <ENTER> r cx<ENTER> 000f<ENTER> n caps_on.com<ENTER> w<ENTER> q<ENTER>
Redirect this script file into the DEBUG utility by entering the following command at the DOS prompt:
C:\>debug < caps_on.scr
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:
This should result in the CAPS LOCK indicator light coming on just as if you had pressed the CAPS LOCK key.
This program can be modified to turn CAPS LOCK off rather than on. To dothis, follow the steps in the example above, replacing all instances of"CAPS_ON" with "CAPS_OFF" and substituting the following line for thefourth line of the DEBUG script file: