Command Prompt for Windows



Send a number of key strokes to the specified window.


SENDKEYS "who" "keys" [/C]
whoA string that specifies the window to send the keys to. This can be either a window caption or a window class. By default who is a window caption, use the /C switch to specify a window class.
keysA string containing a sequence of characters which specifies the key strokes to be sent.
/CSpecifies that parameter who refers to a window class.

Specifying the key strokes

The string containing the key strokes can include any print-able ASCII characters, that is, characters in the ASCII range of 32 to 126 inclusive. However, there are a number of characters that have a special meaning, these include :-

Short Hand Character.
~Press the ENTER key.
Change State Characters. These characters change the state of the next key pressed or a Sub Group of key presses.
+Hold down the SHIFT key.
^Hold down the CONTROL key.
%Hold down the ALT key.
Group Characters.
{ }Used to specify a Special Key and/or give a key a Repeat Count.
( )Used to group a number of keys together, that is, to specify a Sub Group.


The maximum number of characters that can be sent is 128.

Examples for parameter keys.