Skip to main content
Kofax

How to press a combination of keys in a Desktop Automation step

307340

Question / Problem: 

The Desktop Automation step "Press Key" has the option to add modifiers but this only works when pressing combinations of two keys. How to configure the step to press more (e.g. Windows+Ctrl+F) ?

Answer / Solution: 

Use the virtual key codes from here to build a step to press multiple keys then release them.

Modify the Press key step as follows:

  1. for "Key" select "Calculated key"
  2. In the "Key Code" field, enter the sequence of keys to be pressed and released, using their virtual codes and separated with space.
    To press a key, enter the virtual code for it preceeded by "v" (e.g. v0x11 for Ctrl) To release it, enter the same virtual code, followed by ",fu" (e.g. v0x11,fu for releasing Ctrl key).
Example:

Key Code

v0x5b v0x11 v0x46 v0x5b,fu v0x11,fu v0x46,fu

Presses Windows+CTRL+F (so opens "Find Computers") as: 0x5b = Left Windows Key, 0x11 = CTRL key, 0x46 = F key

Press Key step:

clipboard_e98ab6f1251bbaf1b9030bf627677bd7a.png

Whole Key Code (using a value in this example, but can be set to use an Expression:)

clipboard_e53e5e41a0cf8d6ef5360d108293527ae.png

Applies to:  

Product Version Category
RPA 10.x Desktop Automation

 

Author:  Delia Milchis