How to press keyboard shortcuts in Power Automate Desktop

by

This article refer from the question and answer from Microsoft Comunity

The actions that we use for press keyboard shortcuts is Send Keys

Parameters of Send keys action

  1. Send keys to this parameter to specify the window destination where the key is to be sent. There are four types as follows:
  • Foreground window send key to the window that currently has the focus
  • UI element send key to the UI element (It can add new UI element or select from the UI that had been captured)
  • Window instance/handle send key to Window instance which is got from “Get window” action
  • Title and/or class send key to specify title or class
Example for using “Send keys” action with various types of “Send keys to” parameter

2. Text to Send

  • Input as text, variable or expression
  • Direct encrypted text input
  • Insert special keys
  • Insert modifier
Example of using “Send keys” action with various types of “Text to send” parameter

3. Delay between keystrokes

Default value 10 ms

4. Send Text as hardware keys

Specifies the key entry method. If OFF does not work, change to ON.

Default value is OFF. If OFF does not work, try ON.

How to press shortcuts

Press 2 keys:

{KeyCode1}({KeyCode2}) e.g. if you want to press Ctrl+A, it will be:

{Control}({A})

Press 3 keys:

{KeyCode1}({KeyCode2}({Keycode3})) e.g. if you want to press Ctrl+Shift+N, it will be:

{Control}({Shift}({N}))

Example of using “Send keys” action for press shortcuts

You can copy the source code of this article from below link and paste it into your Power Automate Desktop’s Workspace.

Did You Enjoy this Article?

Subscription to get new articles sent to your inbox each week for FREE

Question?

If you have any questions or feedback about this article please leave a message in the comments section below.


Comments

4 responses to “How to press keyboard shortcuts in Power Automate Desktop”

  1. Rajasekhar Avatar
    Rajasekhar

    how to send Control+1 on excel using power automate desktop sendkeys action

    Like

    1. Please try {LControlKey}({D1})

      Like

  2. Neeraj Avatar

    how to send Ctrl + Shift + # on excel using power automate desktop

    Like

    1. {Control}({Shift}({D3}))

      Like

Leave a comment

Subscribe to get new articles sent to your inbox each week for FREE