Press Keys CV#

Emulates keyboard key presses. It can emulate both continuous text input and key combinations, as well as any combination of special keys and text. Combinations can include not only keyboard keys, but also mouse buttons. To record key combinations, open the selector window and click the "Record" button.

Selector

[Selector] Identifier of the UI element.

If the selector is empty, the click will be performed using the specified offsets from the current mouse position.

Keys

[Text] Text or keys, that need to be emulated.

For example:

  • "Test text" - the keys for entering this string will be emulated;
  • "[+CTRL][S][-CTRL]" - the Ctrl+S key combination will be pressed.

Within a single block, you can combine continuous text input and key presses.

To record key combinations, open the selector window and click the "Record" button.

Process ID

[Link] Variable, in which the process identifier is stored. Indicates, which application should be worked with.

If the specified application is minimized or its window is covered by other windows, it will be brought to the foreground. When working with browsers, the process ID additionally specifies the specific browser tab that the block should work with.

If the property is left empty, or if the Process ID variable was not previously assigned when the application was launched or the browser was opened, the application and browser tab will be determined from the content of the corresponding selector line.

The process ID can be obtained, for example, using the "Run Application" or "Get Process" blocks.

Interactive

If enabled, pauses will be inserted between key presses.

We recommend enabling this property if individual letters are lost during text input emulation because of the application or web page behavior.

Pause Time[Number] If the Interactive property is enabled, the pause specified here in milliseconds will be inserted between key presses.
Select AllSend the "Select all" keyboard shortcut (Ctrl+A) before starting input.
Text OnlyIf enabled, all text is treated as characters and will not be split into control keys.
Delay Before[Number] Delay in seconds before executing the block.
Delay After[Number] Delay in seconds after executing the block.
Timeout[Number] Maximum wait time for the specified element in seconds.
X Offset

[Number] Relative click offset on the X axis from the upper-left corner of the element.

If no value is specified (the property is empty), the element center will be used as the click point.

Y Offset

[Number] Relative click offset on the Y axis from the upper-left corner of the element.

If no value is specified (the property is empty), the element center will be used as the click point.

Waiting Selector

[Selector] Identifier of the UI element.

If the selector is empty, the block will not wait for this element to appear.

Waiting Selector Wait Type

Choose the wait type:

  • Appear - appearance,
  • Disappear - disappearance.
Delay Before Checking Waiting Selector[Number] Delay Before Checking Waiting Selector.
Waiting Time for Waiting Selector[Number] Maximum wait time for the element specified in the waiting selector, in seconds.
Number of Attempts for Waiting Selector

[Number] Number of Attempts for Waiting Selector.

If the waiting selector is not found, the block will click the main selector.

Auto ScrollingIf selected, the list will automatically scroll to the element that is outside the visible area.
Movement SimulationWhen enabled, mouse cursor movement from the current position to the point calculated by the block will be simulated.
Click SimulationWhen enabled, a WM message will be sent to the element to emulate a click.
Auto Release

When enabled, pressed keys (with the + modifier, for example [+CTRL]) will be automatically released after the block finishes.

If the property is disabled, you must manually release the previously pressed key (with the - modifier, for example [-CTRL]).

Convert to Key Codes

Linux only. Allows the specified text to be converted to key codes.

Used if the standard text input method does not work. The property selects the key combination used to switch languages.

Important: in this mode, you cannot combine system keys and text. That means you will need to use two blocks.

Error Handling Level

Selection of the error handling level.

Possible values:

  • "Default" - default;
  • "Ignore" - errors are ignored;
  • "Handle" - errors are handled.

If "Default" is selected, the value from the "Start" block of this diagram will be used.

Message Level

Selection of the message level that blocks will output during operation.

Possible values:

  • "Default" - default;
  • "Release" - output disabled;
  • "Debug" - main information output;
  • "Detailed" - detailed information output.

If "Default" is selected, the value from the "Start" block of this diagram will be used.

Error Text[Text] Returns detailed information about the error in case of incorrect execution of the block.