Purpose:Set the state of the keyboard toggles Caps Lock, Num Lock, and Scroll Lock, or enable/disable the keyboard.

 

Format:KEYBD [/Cn /K[0|1] /Nn /Sn]

 

n can be either 0 to toggle the key off or 1 to toggle the key on.

 

/C(aps lock)

/N(um lock)

/K(eyboard lock)

/S(croll lock)

 

Usage:

 

Most keyboards have 3 toggle keys, the Caps Lock, Num Lock, and Scroll Lock. KEYBD lets you turn any toggle key on or off. It is most useful in batch files and aliases if you want the keys set a particular way before collecting input from the user.

 

For example, to turn off the Num Lock and Caps Lock keys, you can use this command:

 

keybd /c0 /n0

 

If you use the KEYBD command with no switches, it will display the present state of the toggle keys.

 

The toggle key state is typically the same for all sessions, and changes made with KEYBD in one session will therefore affect all other sessions.

 

Options:

 

/CTurn the Caps Lock key on or off.

 

/KDisable (0) or enable (1) the keyboard. You can also reenable a disabled keyboard with Ctrl-Alt-End.

 

/NTurn the Num Lock key on or off.

 

/STurn the Scroll Lock key on or off.