How to hold a key

Asked by Adam Pospelovsky on 2019-05-19

Hi,
I just need to make Sikuli holding a CTRL key while running a function. How can I do that?
Something like a:
def myFunction ():
     hold(Key.CTRL) // still hold this until the for is finished
     for x in findAll("someimage.png"):
    click(x)

and then call a function like this:

myFunction();

Is that possible?

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
masuo
Solved:
2019-05-19
Last query:
2019-05-19
Last reply:
2019-05-19
Adam Pospelovsky (adampos) said : #2

Thanks masuo, that solved my question.