You have a few options depending on how you want to pass along the special keys. As referenced by @Sebax in the Question's comments and @Mads T's answer I thought it would be good to go into more details.
When using Type Into activity, you have three methods depending on your needs
- Default Slowest of the three methods, using the hardware driver. It does NOT automatically erase pre-existing text nor does it work in the background, but supports special key strings (e.g.
[k(enter)]
)
- SendWindowMessages It does NOT automatically erase pre-existing text but does work in the background while supporting special key strings (e.g.
[k(enter)]
)
- SimulateType is the fastest of the three methods. It automatically erases pre-existing text and works in the background but does not support special key strings (e.g.
[k(enter)]
), in this case, you'll want to pair it with the Send Hotkey
activity.
Special Key Strings
I've seen mention of k
, d
, and u
in the UiPath Forums here and there, but have not seen official documentation that explains the modifiers or lists out the available special characters asides from looking at the Send Hotkey
dropdown list.
- k: Synthesize a key down (press) followed by a key up (release) for the specified key.
- d: Synthesize a key down (press and hold) event for the specified key.
- u: Synthesize a key up (release) event for the specified key.
Special Key examples
"Hello[k(enter)"
will type out "Hello
" followed by a carriage return.
"[d(alt)]efun[u(alt)]Hello[k(enter)k(esc)]"
would
- Press down and hold the
Alt
key
- Press the keys
e
, f
, u
, and n
- Release the
Alt
Key
- Type the characters
Hello
- Press the
Enter
key
- Press the
Esc
key
Send Hotkey
The send hotkey is pretty straightforward. Indicate the key(s) you want to send and if needed check the key modifiers (Alt
, Ctrl
, Shift
, Win
). If the key you are sending is a special key (e.g. Enter
), then you'll also want to enable the SpecialKey
property of the activity.
Send Hotkey can use the Default
or SendWindowMessages
inputs.
References: