How to keep a key pressed?

I created a citrix sequence that clicks on multiple images. I need to hold the Ctrl key while pressing the images. Is this possible?

1 Like

Have a look at ‘Key Modifier’ property for ‘Click’ activity.

Rammohan B.

Interesting. I guess what Edacal is to hold Ctrl in one activities, and click multiple images in other activities.
I don’t think this can be done in one activity.
Unfortunately I don’t have answer to this, but would like to hear the result too.

Hi @Jane

One way is to use the Keymodifier like what was suggested for each click activity, so it holds down for example Ctrl each time it clicks.

The other way is to use the TypeInto and perform a down keypress, but be careful because the key will be stuck down until it is released by using the up keypress.



Looks like your latter idea could work. (The first one won’t work because, for this case, we want to HOLD ctrl key and click images, before release ctrl key. Any Keymodifier option will hold and release in one activities.)


I can’t manage to make it work with other keys, like A or H. Is it possible to do?

Do you mean you want to hold down ‘a’ while clicking? Actually, I am not sure you can do that.

One thing you can try though is with a TypeInto use this string “[d(a)]” before the click and “[u(a)]” after the click. I have no idea if that will work and have not tried it. ‘d’ is for down keypress and ‘u’ is for up keypress - though, keep in mind if the click fails, then the key is stuck in the down position.

I feel like you should find a different approach to interacting with the element, though.


Yes that’s right. I’ve tried the d and u modifiers but didn’t work. It did work well with ctrl.
Recently what I had to do is to hold space or pagedown, so to load a long list of elements inside a web, but neither of them worked with this u and d thing. I ended up using ctrl+home and ctrl+end several times to achieve this. I think it would have been easier to just hold space or pagedown, but I couldn’t make it work.
Thanks for your answer. Cheers.

I’ve looking for hold pgup key for like 3 seconds but can’t catch the answer yet.

I need to hold down the “C” key for 10 seconds.

You could try using a TypeInto to hold down with a DelayAfter of 10000, then a TypeInto to release.
For example,
TypeInto "[d(c)]" //delayAfter as 10000
TypeInto "[u(c)]"

d for downkeypress
u for upkeypress