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

KeyboardShortcut

Sends one or more keyboard shortcuts to a UI element.

This API must be added after Open or Attach.

Definition

Namespace: UiPath.UIAutomationNext.API.Models

Assembly: UiPath.UIAutomationNext.API.Models (in UiPath.UIAutomationNext.API.Models dll)

Overloads

OverloadDescription
KeyboardShortcut(TargetAnchorableModel,KeyboardShortcutOptions)Sends one or more keyboard shortcuts to a UI element, identified as a TargetAnchorableModel object, along with other options.
KeyboardShortcut(String, KeyboardShortcutOptions)Sends one or more keyboard shortcuts to a UI element, identified as a string from the Object Repository, along with other options.
KeyboardShortcut(String, String, Double)Sends one or more keyboard shortcuts to a UI element, identified as a string from the Object Repository, along with other options.
KeyboardShortcut(TargetAnchorableModel, String, Double)Sends one or more keyboard shortcuts to a UI element, identified as a TargetAnchorableModel object, along with other options.

KeyboardShortcut(TargetAnchorableModel,KeyboardShortcutOptions)

Sends one or more keyboard shortcuts to a UI element, identified as a TargetAnchorableModel object, along with other options.
KeyboardShortcut(
    TargetAnchorableModel target,
    KeyboardShortcutOptions keyboardShortcutOptions)KeyboardShortcut(
    TargetAnchorableModel target,
    KeyboardShortcutOptions keyboardShortcutOptions)
target TargetAnchorableModel
The specific UI element that you want to send the keyboard shortcut to, identified as a TargetAnchorableModel object.
keyboardShortcutOptions KeyboardShortcutOptions
  • Shortcuts String - The keyboard shortcuts to be sent.
  • ActivateBefore Boolean - If set to True, the target UI element is brought to the foreground and activated before sending the shortcuts. This option is True by default.
  • DelayBetweenShortcuts Double - Delay (in seconds) between consecutive keyboard shortcuts. The default value is 0.5 seconds.
  • DelayBetweenKeys Double - Delay (in seconds) between the keys inside a keyboard shortcut.
  • ClickBeforeMode NClickMode - choose the type of click operation:
    • None
    • Single
    • Double
  • InteractionMode NChildInteractionMode - Specifies the API used to perform the action. The following options are available:
    • SameAsCard - Use the same input mode as the Open or Attach APIs . This is the default selection.
    • HardwareEvents - Uses the hardware driver to perform the action. This is the slowest API, it cannot work in the background, but it is compatible with all desktop apps.
    • DebuggerApi - Performs actions using debugger APIs. Works for Chromium elements only. Sends all text in one go. Works even if the target application is not in focus. For more details, check out this page.
    • WindowMessages - Sends the input through Win32 messages. Recommended for desktop apps. Usually more reliable than Hardware Events. Sends all text in a single action. Works even if target app is not in focus. Please test if your target application UI element supports this

KeyboardShortcut(String, KeyboardShortcutOptions)

Sends one or more keyboard shortcuts to a UI element, identified as a string from the Object Repository, along with other options.

KeyboardShortcut(
    strint target, 
    KeyboardShortcutOptions keyboardShortcutOptions)KeyboardShortcut(
    strint target, 
    KeyboardShortcutOptions keyboardShortcutOptions)
target String
The specific UI element that you want to send the keyboard shortcut to, identified as a string from the object repository.
keyboardShortcutOptions KeyboardShortcutOptions
  • Shortcuts String - The keyboard shortcuts to be sent.
  • ActivateBefore Boolean - If set to True, the target UI element is brought to the foreground and activated before sending the shortcuts. This option is True by default.
  • DelayBetweenShortcuts Double - Delay (in seconds) between consecutive keyboard shortcuts. The default value is 0.5 seconds.
  • DelayBetweenKeys Double - Delay (in seconds) between the keys inside a keyboard shortcut.
  • ClickBeforeMode NClickMode - choose the type of click operation:
    • None
    • Single
    • Double
  • InteractionMode NChildInteractionMode - Specifies the API used to perform the action. The following options are available:
    • SameAsCard - Use the same input mode as the Open or Attach APIs . This is the default selection.
    • HardwareEvents - Uses the hardware driver to perform the action. This is the slowest API, it cannot work in the background, but it is compatible with all desktop apps.
    • DebuggerApi - Performs actions using debugger APIs. Works for Chromium elements only. Sends all text in one go. Works even if the target application is not in focus. For more details, check out this page.
    • WindowMessages - Sends the input through Win32 messages. Recommended for desktop apps. Usually more reliable than Hardware Events. Sends all text in a single action. Works even if target app is not in focus. Please test if your target application UI element supports this

KeyboardShortcut(String, String, Double)

Sends one or more keyboard shortcuts to a UI element, identified as a string from the Object Repository, along with other options.

KeyboardShortcut(
    string target, 
    string shortcuts,
    [double delayBetweenShortcuts])KeyboardShortcut(
    string target, 
    string shortcuts,
    [double delayBetweenShortcuts])
target String
The specific UI element that you want to send the keyboard shortcut to, identified as a string from the object repository.
shortcuts String
The keyboard shortcut that you want to send to the UI element.
delayBetweenShortcuts Double
Delay (in seconds) between consecutive keyboard shortcuts. The default value is 0.5 seconds.

KeyboardShortcut(TargetAnchorableModel, String, Double)

Sends one or more keyboard shortcuts to a UI element, identified as a TargetAnchorableModel object, along with other options.
KeyboardShortcut(
    TargetAnchorableModel target,
    string shortcuts,
    [double delayBetweenShortcuts])KeyboardShortcut(
    TargetAnchorableModel target,
    string shortcuts,
    [double delayBetweenShortcuts])
target TargetAnchorableModel
The specific UI element that you want to send the keyboard shortcut to, identified as a TargetAnchorableModel object.
shortcuts String
The keyboard shortcut that you want to send to the UI element.
delayBetweenShortcuts Double
Delay (in seconds) between consecutive keyboard shortcuts. The default value is 0.5 seconds.

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.