Skip to content

SendKeys

The SendKeys component enables users to enter data in text boxes, drop down list etc. Using this component, you can select the application to enter data and specify the text to append to it. The SendKeys component simulates keyboard strokes as opposed to using Inter Process Communication (IPC). The SendKeys component also allows users to send special keys to an application, such as Shift, Control, F1, F2, etc.

Screenshot

Supported Functions

Other than standard keyboard characters, SendKeys control also supports Special Keys listed below. To send special keys to an application use the square brackets.
To send special keys like a Enter, Tab, WIN+R etc to any application use the square brackets like [Enter], [Tab], [LWin+R].

Supported Keyboard Keys Description
A The A key.
AbntC1 The ABNT_C1 (Brazilian) key.
AbntC2 The ABNT_C2 (Brazilian) key.
Add The Add key.
Apps The Application key (Microsoft Natural Keyboard).
Attn The ATTN key.
B The B key.
Back The Backspace key.
BrowserBack The Browser Back key.
BrowserFavorites The Browser Favorites key.
BrowserForward The Browser Forward key.
BrowserHome The Browser Home key.
BrowserRefresh The Browser Refresh key.
BrowserSearch The Browser Search key.
BrowserStop The Browser Stop key.
C The C key.
Cancel The Cancel key.
Capital The Caps Lock key.
CapsLock The Caps Lock key.
Clear The Clear key.
CrSel The CRSEL key.
D The D key.
D0 The 0 (zero) key.
D1 The 1 (one) key
D2 The 2 key.
D3 The 3 key.
D4 The 4 key.
D5 The 5 key.
D6 The 6 key.
D7 The 7 key.
D8 The 8 key.
D9 The 9 key.
DbeAlphanumeric The DBE_ALPHANUMERIC key.
DbeCodeInput The DBE_CODEINPUT key.
DbeDbcsChar The DBE_DBCSCHAR key.
DbeDetermineString The DBE_DETERMINESTRING key.
DbeEnterDialogConversionMode The DBE_ENTERDLGCONVERSIONMODE key.
DbeEnterImeConfigureMode The DBE_ENTERIMECONFIGMODE key.
DbeEnterWordRegisterMode The DBE_ENTERWORDREGISTERMODE key.
DbeFlushString The DBE_FLUSHSTRING key.
DbeHiragana The DBE_HIRAGANA key.
DbeKatakana The DBE_KATAKANA key.
DbeNoCodeInput The DBE_NOCODEINPUT key.
DbeNoRoman The DBE_NOROMAN key.
DbeRoman The DBE_ROMAN key.
DbeSbcsChar The DBE_SBCSCHAR key.
DeadCharProcessed The key is used with another key to create a single combined character.
Decimal The Decimal key.
Delete The Delete key.
Divide The Divide key.
Down The Down Arrow key.
E The E key.
End The End key.
Enter The Enter key.
EraseEof The ERASE EOF key.
Escape The ESC key.
Execute The Execute key.
ExSel The EXSEL key.
F The F key.
F1 The F1 key.
F10 The F10 key.
F11 The F11 key.
F12 The F12 key.
F13 The F13 key.
F14 The F14 key.
F15 The F15 key.
F16 The F16 key.
F17 The F17 key.
F18 The F18 key.
F19 The F19 key.
F2 The F2 key.
F20 The F20 key.
F21 The F21 key.
F22 The F22 key.
F23 The F23 key.
F24 The F24 key.
F3 The F3 key.
F4 The F4 key.
F5 The F5 key.
F6 The F6 key.
F7 The F7 key.
F8 The F8 key.
F9 The F9 key.
FinalMode The IME Final mode key.
G The G key.
H The H key.
HangulMode The IME Hangul mode key.
HanjaMode The IME Hanja mode key.
Help The Help key.
Home The Home key.
I The I key.
ImeAccept The IME Accept key.
ImeConvert The IME Convert key.
ImeModeChange The IME Mode change request.
ImeNonConvert The IME NonConvert key.
ImeProcessed A special key masking the real key being processed by an IME.
Insert The Insert key.
J The J key.
JunjaMode The IME Junja mode key.
K The K key.
KanaMode The IME Kana mode key.
KanjiMode The IME Kanji mode key.
L The L key.
LaunchApplication1 The Launch Application1 key.
LaunchApplication2 The Launch Application2 key.
LaunchMail The Launch Mail key.
Left The Left Arrow key.
LeftAlt The left ALT key.
LeftCtrl The left CTRL key.
LeftShift The left Shift key.
LineFeed The Linefeed key.
LWin The left Windows logo key (Microsoft Natural Keyboard).
M The M key.
MediaNextTrack The Media Next Track key.
MediaPlayPause The Media Play Pause key.
MediaPreviousTrack The Media Previous Track key.
MediaStop The Media Stop key.
Multiply The Multiply key.
N The N key.
Next The Page Down key.
NoName A constant reserved for future use.
None No key pressed.
NumLock The Num Lock key.
NumPad0 The 0 key on the numeric keypad.
NumPad1 The 1 key on the numeric keypad.
NumPad2 The 2 key on the numeric keypad.
NumPad3 The 3 key on the numeric keypad.
NumPad4 The 4 key on the numeric keypad.
NumPad5 The 5 key on the numeric keypad.
NumPad6 The 6 key on the numeric keypad.
NumPad7 The 7 key on the numeric keypad.
NumPad8 The 8 key on the numeric keypad.
NumPad9 The 9 key on the numeric keypad.
O The O key.
Oem1 The OEM 1 key.
Oem102 The OEM 102 key.
Oem2 The OEM 2 key.
Oem3 The OEM 3 key.
Oem4 The OEM 4 key.
Oem5 The OEM 5 key.
Oem6 The OEM 6 key.
Oem7 The OEM 7 key.
Oem8 The OEM 8 key.
OemAttn The OEM ATTN key.
OemAuto The OEM AUTO key.
OemBackslash The OEM Backslash key.
OemBackTab The OEM BACKTAB key.
OemClear The OEM Clear key.
OemCloseBrackets The OEM Close Brackets key.
OemComma The OEM Comma key.
OemCopy The OEM COPY key.
OemEnlw The OEM ENLW key.
OemFinish The OEM FINISH key.
OemMinus The OEM Minus key.
OemOpenBrackets The OEM Open Brackets key.
OemPeriod The OEM Period key.
OemPipe The OEM Pipe key.
OemPlus The OEM Addition key.
OemQuestion The OEM Question key.
OemQuotes The OEM Quotes key.
OemSemicolon The OEM Semicolon key.
OemTilde The OEM Tilde key.
P The P key.
Pa1 The PA1 key.
PageDown The Page Down key.
PageUp The Page Up key.
Pause The Pause key.
Play The PLAY key.
Print The Print key.
PrintScreen The Print Screen key.
Prior The Page Up key.
Q The Q key.
R The R key.
Return The Return key.
Right The Right Arrow key.
RightAlt The right ALT key.
RightCtrl The right CTRL key.
RightShift The right Shift key.
RWin The right Windows logo key (Microsoft Natural Keyboard).
S The S key.
Scroll The Scroll Lock key.
Select The Select key.
SelectMedia The Select Media key.
Separator The Separator key.
Sleep The Computer Sleep key.
Snapshot The Print Screen key.
Space The Spacebar key.
Subtract The Subtract key.
System A special key masking the real key being processed as a system key.
T The T key.
Tab The Tab key.
U The U key.
Up The Up Arrow key.
V The V key.
VolumeDown The Volume Down key.
VolumeMute The Volume Mute key.
VolumeUp The Volume Up key.
W The W key.
X The X key.
Y The Y key.
Z The Z key.
Zoom The ZOOM key.

Ports

The SendKeys component exposes Control In, Control Out, and Data In ports by default.

Port Description
Control In Must be connected to the Control Out port of one or more components.
Control Out Can be connected to the Control In port of another component, or the default end component.
Data In Specifies the text to be entered in a particular application (String). Special Keys can be passed using the square brackets for instance:[enter][ctrl+c]Intellibot[ctrl+s]

Properties

To edit the properties of the SendKeys component, in the Properties window, change the required property.

You can edit the following properties:

Property Description
Search Search for the respective property.
Delay After Execution Specifies the wait time (in seconds) after the action is executed.
Delay Before Execution Specifies the wait time (in seconds) before the action is executed.
Delay between each key press Specifies the wait time (in seconds) between every key press while entering the text.
Clear Existing Value Clear any existing input before execution.
Input SendInput: is a method to simulate key strokes to target application. This method works almost everywhere except in some Unicode environments.
SendKeys: is another method to simulate key strokes like SendInput, however this method works under certain restrictions applied by Operating system (for example, this does not work for RDP sessions).
Background: method simulates key strokes using windows messaging unlike SendInput & SendKeys. This approach works mostly for application that rely on windows messaging (like windows desktop applications).
Scancodes: is another alternative method to send virtual key strokes. This method would be very helpful where the above methods do not work.
Name Specifies the name for the SendKeys component.Always set the name to match the application field you are interacting with.
Click X Specifies the location of the Click action on the x-axis.
Click Y Specifies the location of the Click action on the Y-axis.
Search As Gray Scale Image Defines the selected area as a gray scale image.
Threshold Specifies the image matching accuracy before performing the Send Keys operation.Value of 1 defines 100% match, 0.5 defines 50% match; Default value is 0.9 or 90% match.
Max Wait Time in Seconds Specifies the wait time (in seconds) for the application to appear on the screen. The default value is set to 30 seconds.
Wait After Image Found Specifies the wait time (in seconds) after an image is located.
Wait For Create Specifies if the Send Keys component must wait for the application to appear on the screen. The default value is True.

Example

Let us assume, I wanted to open a File menu on a notepad using Alt+f keyboard shortcut

Let us consider an example, we use [alt+f] keyboard shortcut to open a File menu.

Screenshot

To use the SendKeys component:

  1. In the Toolbox, expand Actions.

  2. Drag the SendKeys component and drop it on the Design surface.

  3. Double click on the SendKeys component to add multiple images. Screenshot

  4. To select the region, click on the camera icon on the SendKeys component .Screenshot. The Press "CTRL+SHIFT" for selection message is displayed.

  5. Press Ctrl+Shift key.The mouse pointer becomes a crosshair.

  6. If the First captured image is not displayed on the screen then it searches for next captured image. Click Screenshot sign to add next image.

  7. Select the required area of the notepad application. For this example, capture a screen shot of the notepad. The selected region is displayed in the SendKeys component.

  8. Double-Click Text Input property and enter the Keyboard shortcut keys in square braces as shown in the image.

  9. Connect:

    • The control ports between Start and the SendKeys component.

    • The Control Out port of the SendKeys component with the Control In port of the default END component.

  10. In the toolbar, click Run.

Output

Screenshot