Holding down a button?

Asked by Simon K

Before you ask, ive seen this question already - https://answers.launchpad.net/sikuli/+question/99808

My question is - has this been implemented since then? If not, how would one go about simulating a key held down for x seconds or until X appears on the screen?

Thanks in advance

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

Are you not using Sikuli X (at least rc2) ?

since Sikuli X we have

keyDown(), KeyUp()

and

mouseDown(), mouseUp()

more info: see docs.

If you want to search (wait) and hold down in parallel, you have to combine it with observe(FOREVER, background = True).

Revision history for this message
Simon K (szymonkaz) said :
#2

I havent actually sat down to sikuli yet, I'm currently researching various GUI testing tools, and decided to ask - thanks for help!

I've got to say though, Sikuli looks promising!

Revision history for this message
Simon K (szymonkaz) said :
#3

Thanks RaiMan, that solved my question.