sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #35526
Re: [Question #273795]: KeyDown and MouseDown together doesn't seem to work
Question #273795 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/273795
Status: Answered => Solved
Ib Al confirmed that the question is solved:
@RaiMan, thanks for that tip. Might come in handy later.
After trying out different things last night, I got it working by simply
changing KeyModifier.CMD with Key.CMD. I was reading the documentation
on Key/KeyModifier and it was not very clear to me when to use one over
the other.
Anyway, this basically works for me and I've verified that BOTH actions
are executed simultaneously.
imageMatch.keyDown(Key.CMD);
imageMatch.mouseDown(Button.LEFT);
imageMatch.mouseUp(Button.LEFT);
... // do more clicks or whatever
imageMatch.keyUp(Key.CMD);
Also, imageMatch.click() can be used instead of mouseDown-MouseUp; saves
a line of code :)
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.