Microsoft KB Archive/151715

{|
 * width="100%"|

How to Toggle the CAPS LOCK and NUM LOCK Keys

 * }

Q151715

-

The information in this article applies to:


 * Microsoft Windows 95

-

SUMMARY
This article describes how to create MS-DOS-based programs to toggle the CAPS LOCK and NUM LOCK keys on and off.

To Toggle the CAPS LOCK Key On
 Use any text editor (such as Notepad) to create the following file: Save the file as Capson.deb  Type the following line at a command prompt: "debug < capson.deb" This creates an MS-DOS-based program named Caps_on.com that toggles the CAPS LOCK key on. 

To Toggle the CAPS LOCK Key Off
  Use any text editor (such as Notepad) to create the following file:      a 100 mov ax,0040 mov ds,ax and byte ptr [0017],bf mov ah,1

int 16 mov ax,4c00 int 21

r cx     0013 n CAPS_OFF.COM w     q  Save the file as Capsoff.deb  Type the following line at a command prompt: "debug < capsoff.deb" This creates an MS-DOS-based program named Caps_off.com that toggles the CAPS LOCK key off. </ol>

To Toggle the NUM LOCK Key On
  Use any text editor (such as Notepad) to create the following file: <pre class="FIXEDTEXT">     a 100 mov ax,0040 mov ds,ax or byte ptr [0017],20 mov ah,1

int 16 mov ax,4c00 int 21

r cx     0013 n NUM_ON.COM w     q </li> Save the file as Numon.deb</li>  Type the following line at a command prompt: "debug < numon.deb" This creates an MS-DOS-based program named Num_on.com that toggles the NUM LOCK key on. </li></ol>

To Toggle the NUM LOCK Key Off
  Use any text editor (such as Notepad) to create the following file: <pre class="FIXEDTEXT">     a 100 mov ax,0040 mov ds,ax and byte ptr [0017],df mov ah,1

int 16 mov ax,4c00 int 21

r cx     0013 n NUM_OFF.COM w     q </li> Save the file as Numoff.deb</li>  Type the following line at a command prompt: "debug < numoff.deb" This creates an MS-DOS-based program named Num_off.com that toggles the NUM LOCK key off. </li></ol>

Using the Toggle Programs
Place the appropriate command in the Autoexec.bat or Config.sys file to automatically toggle the keys you want. For example, adding

<pre class="FIXEDTEXT">  NUMLOCK=OFF

-or-

NUMLOCK=ON to the Config.sys file will turn off or turn on the NUM LOCK key.

NOTE: You must be using MS-DOS version 6.x or later. This function was retained in Windows 95.

Additional query words: capslock numlock caps num elite boot

Keywords : kbprogramming win95

Issue type : kbhowto

Technology : kbWin95search kbWin95