Hit Key

The Hit Key block executes terminal-specific commands by sending a selected terminal key/action to the active terminal session. It is used in terminal automation flows where you need to trigger actions such as submitting input (for example, Enter) or invoking other supported terminal commands.

Note: The Green Screen Recorder and terminal building blocks are available with Enterprise plans.

Fully expanded, the Hit Key block shows the following properties:

image-20260128-151634.png

Note: The screenshot on this page uses the Elegance Design, introduced in 2025.3. If you are using an earlier version, your layout may look different.

Quick-start

  1. Drag Hit Key onto the canvas.

  2. Connect the block in the flow and optionally specify the basic parameters required for this block to operate: Terminal Keys, Default timeout.

  3. Run the flow when it’s ready.

Building block parameters

Parameters
  1. Block header: Shows the current title of the block. You can change the title by double-clicking the header and typing a new title.

  2. Terminal Keys: Selects the terminal command to execute. This list contains the commands used by the terminals that Leapwork supports.

  3. Error occurred: This output connector is triggered if Hit Key returns an error during execution. You can use it to branch the flow for error handling.

  4. Default timeout: Controls whether the block uses the default timeout from the flow settings or a custom timeout value.

  5. Timeout (sec): When Default timeout is not selected, this field lets you type the timeout you need for the block.

Resources

Topic

Description

Flows FAQ

Common questions about creating, running, and managing flows in Leapwork.

Flows Troubleshooting

Guidelines and solutions for identifying and fixing issues that occur when building or running flows in Leapwork.