# Press Keys

Emulation of key presses on the keyboard. It can emulate both continuous text input and key combinations, as well as any combinations of special keys and text. The combinations can use not only keyboard keys but also mouse buttons.

To record key combinations, go to the selector window and press the "Record" button.

<table data-header-hidden><thead><tr><th width="238" valign="top"></th><th width="319" valign="top"></th></tr></thead><tbody><tr><td valign="top">Selector</td><td valign="top">[Selector] The identifier of the user interface element. If the property is not empty, the focus will be set on the specified user interface element before the key press emulation begins.</td></tr><tr><td valign="top">Keys</td><td valign="top"><p>[Text] The text or keys that need to be emulated. For example:</p><ul><li>"Test text" - the keys for entering this string will be emulated;</li><li>"[+CTRL][S][-CTRL]" - the key combination Ctrl+S will be pressed.</li></ul><p>Within a single block, continuous text input and key presses can be combined. To record key combinations, go to the selector window and press the "Record" button.</p></td></tr><tr><td valign="top">Process ID</td><td valign="top"><p>[Link] A variable that stores the process identifier. Indicates which application needs to be worked with.</p><p>If the specified application is minimized or its window is covered by other windows, it will be brought to the foreground.</p><p>When working with browsers, the process ID additionally specifies the particular browser tab that the block should work with.</p><p>If the property is left empty, or if the process ID variable was not previously assigned at the moment of launching the application or opening the browser, the application and browser tab will be determined from the content of the corresponding selector line.</p><p>The process ID can be obtained, for example, using the Launch Application or Get Process blocks.</p></td></tr><tr><td valign="top">Interactively</td><td valign="top">If specified, pauses will be inserted between key presses. It is recommended to enable this property if individual letters are lost during text input emulation due to the application's or web page's characteristics.</td></tr><tr><td valign="top">Pause Time</td><td valign="top">[Number] If the Interactively property is specified, the pause indicated here in milliseconds will be inserted between key presses.</td></tr><tr><td valign="top">Select All</td><td valign="top">Before starting input, send the "select all" key combination (Ctrl+A).</td></tr><tr><td valign="top">Text Only</td><td valign="top">If enabled, all text is treated as characters and will not be broken down into control keys.</td></tr><tr><td valign="top">Delay Before</td><td valign="top">[Number] Delay in seconds before executing the block.</td></tr><tr><td valign="top">Delay After</td><td valign="top">[Number] Delay in seconds after executing the block.</td></tr><tr><td valign="top">Wait Time</td><td valign="top">[Number] The maximum wait time for the specified element in seconds.</td></tr><tr><td valign="top">X Offset</td><td valign="top">[Number] The relative click offset on the X coordinate from the top-left corner of the element. If no value is specified (property is empty), the center of the element will be used as the click point.</td></tr><tr><td valign="top">Y Offset</td><td valign="top">[Number] The relative click offset on the Y coordinate from the top-left corner of the element. If no value is specified (property is empty), the center of the element will be used as the click point.</td></tr><tr><td valign="top">Wait Selector</td><td valign="top">[Selector] The identifier of the user interface element. If the selector is empty, the block will not wait for the appearance of this element.</td></tr><tr><td valign="top">Wait Selector Type</td><td valign="top"><p>Select the wait type:</p><ul><li>AppearAfter - appearance after text input,</li><li>DisappearAfter - disappearance after text input;</li><li>AppearBefore - appearance before text input;</li><li>DisappearBefore - disappearance before text input.</li></ul><p>When selecting After - a mouse click will be made first, then text input, then the wait selector will be checked.</p><p>When selecting Before - a mouse click will be made first, then the wait selector will be checked, then text input.</p></td></tr><tr><td valign="top">Delay Before Checking Wait Selector</td><td valign="top">[Number] Delay before checking the wait selector.</td></tr><tr><td valign="top">Wait Time for Wait Selector</td><td valign="top">[Number] The maximum wait time for the element specified in the wait selector in seconds.</td></tr><tr><td valign="top">Number of Attempts for Wait Selector</td><td valign="top">[Number] The number of attempts for the wait selector. If the wait selector is not found, the block will click on the main selector.</td></tr><tr><td valign="top">Autoscrolling</td><td valign="top">If selected, the list will automatically scroll to the element that is outside the visible area.</td></tr><tr><td valign="top">Simulate Movement</td><td valign="top">If enabled, the mouse cursor movement from the current position to the point calculated by the block will be simulated.</td></tr><tr><td valign="top">Simulate Input</td><td valign="top">If enabled, a WM message will be sent to the element to emulate input.</td></tr><tr><td valign="top">Automatic Release</td><td valign="top"><p>If enabled, pressed keys</p><p>(with modifier +, for example [+CTRL]) will be automatically released after the block is executed.</p><p>If the property is disabled, it is necessary to manually release the previously pressed key (with modifier -, for example [-CTRL]).</p></td></tr><tr><td valign="top">Convert to Key Codes</td><td valign="top"><p>For Linux only.</p><p>Allows the specified text to be converted into key codes. Used if the standard text input method does not work.</p><p>The property selects the key combination used to switch the language.</p></td></tr><tr><td valign="top">Error Handling Level</td><td valign="top"><p>Select the error handling level. Possible values:</p><ul><li>"Default" - default;</li><li>"Ignore" - errors are ignored;</li><li>"Handle" - errors are handled.</li></ul><p>If "Default" is selected, the value of the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Message Level</td><td valign="top"><p>Select the message level that the blocks will output during operation. Possible values:</p><ul><li>"Default" - default;</li><li>"Release" - output is disabled;</li><li>"Debug" - main information output;</li><li>"Detailed" - detailed information output.</li></ul><p>If "Default" is selected, the value of the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Error Text</td><td valign="top">[Text] Returns detailed information about the error in case of incorrect execution of the block.</td></tr></tbody></table>
