activities
latest
false
UiPath logo, featuring letters U and I in white
UI Automation Activities
Last updated Oct 28, 2024

Keypress Event Trigger

UiPath.UIAutomationNext.Activities.NKeyboardTrigger

Description

Sets up a key pressed event trigger on the indicated UI element.

This activity is compatible with Object Repository.

The trigger must be the first activity in the workflow and the workflow is triggered when a certain UI event occurs. Only one trigger per workflow is allowed. For more details, check out Trigger-based Attended Automation.

Note:

If you are using a Studio version lower than 2023.4, you need to place the Application Event Trigger activity inside a Trigger Scope activity. In this case, the Keypress Event Trigger activity does not display the Scheduling mode and Enabled properties and the Scheduling mode property is available in the Trigger Scope activity.

Project compatibility

Windows - Legacy | Windows

Windows - Legacy, Windows configuration

Designer panel
  • Click Indicate target on screen to indicate the UI element to use as target.

    After you indicate the target, select the Menu button to access the following options:

    • Indicate target on screen - Indicate the target again.
    • Edit target - Open the selection mode to configure the target.
    • Remove informative screenshot - Remove the screenshot of the target application or web page.
    • Add to Object Repository - Add the current UI element to a library project, from where it can be reused throughout your automation process.
  • Key modifiers - Adds a key modifier (None, Win, Ctrl, Alt, Shift) to the key sequence to be monitored.
  • Key - The key that is monitored. Special keys are supported and you can select them from the drop-down menu. The key must be set.
  • Block event - Specifies whether the event is blocked from acting on the indicated element. If False, the element is executed against the element. If True, the event is blocked and can be later replayed within the activity handler by using the Replay User Event activity with the EventInfo property set to TriggerEventArgs.Event as the event to be replayed. This field supports only Boolean values. The default value is False.
  • Include children - Triggers the event if any of the child elements are targeted by the action. When selected, the children of the specified UI element are also monitored. This field supports only Boolean values. The default value is True.
Properties panel

Common

  • Display name - The name displayed for the activity in the Designer panel. A display name is automatically generated when you indicate a target.

Input

  • Key - See details in the Designer panel section above.
  • Target - The target element: top-level window or UI element. Only strict selectors are supported, without anchors. Target element must be set. Before indicating on screen, this field is set to (null). Once the target is indicated, all properties regarding the element that was indicated are displayed.
    • Strict selector - The strict selector generated for the target UI element. It is empty for top-level windows.
    • Window selector (Application instance) - The selector for the application window (application/browser).

Misc

  • Enabled - If set to False, the trigger starts but does not fire any events. It can be enabled later at runtime by using the Enable Local Trigger activity. This field supports only Boolean values. The default value is True.
  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level. This field supports only Boolean (True, False) values. The default value is False.

Options

  • Block event - See Block event in the Designer panel.
  • Include children - See Include children in the Designer panel.
  • Key modifiers - See Key modifiers in the Designer panel.
  • Scheduling mode - It specifies how to execute the actions when a trigger is fired. Choose one of five options from the drop-down menu:
    • Sequential - Actions are executed one after another.
    • Concurrent - Actions execution can overlap.
    • OneTime - Executes one action and exits monitoring.
    • Sequential Collapse - Ignores all upcoming events, except the latest, until the current event finishes execution.
    • Sequential Drop - Stops the previous event execution and starts the next event.

    For Sequential and Concurrent modes the monitoring continues until either the user stops the execution or a Break activity is met.

  • Trigger mode - Specifies if the event is triggered when the key is pressed or released. Choose one of two options: Down or Up. The default value is Down.
  • Description
  • Project compatibility
  • Windows - Legacy, Windows configuration

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.