← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #208370]: key input 'Enter'

 

Question #208370 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/208370

    Status: Open => Answered

RaiMan proposed the following answer:
Its definitely hard, to hold you on the road ;-)

The general rule is:
Key.KEYTOPRESSINUPPERCASE

where Key is the class name, that contains defined key constants in
uppercase.

So Key.Enter is either a typo (but should not happen in this case here),
or you did not obey the above rule.

so:
type(Key.ENTER)

... and this can really be taken from the docs.

If you did it this way, then you have to take care, that the GUI element
that should accept the Key.ENTER is the frontmost in that moment and
ready (might need a wait(1) before).

And another possibility, that is not really clear:
should ENTER and SPACE be pressed together.
If yes, this is not possible with type() - use keyDown()/keyUp() (see docs) in this case.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.