Using keyDown and keyUp for regular keys?

Asked by Murmandamus

Hi,

How can I use Region.keyDown() and Region.keyUp() for all the regular keys on my keyboard, and not just the special keys in the Key class? When I do Region.keyDown("x") for example, I get this error:

[error] TypeError ( keyDown(): 1st arg can't be coerced to String, int )

I can't always use Region.type() because I need to be able to control the timing and duration of individual key presses.

Many thanks,

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
RaiMan (raimund-hocke) said :
#2

I will check the possibilities.

Revision history for this message
RaiMan (raimund-hocke) said :
#3

Sorry, but with the current implementation I do not have a solution for you.

I have it on the list as an enhancement for 2.0.6 (no commitment on release date currently :-(

Revision history for this message
RaiMan (raimund-hocke) said :
#4

If you are willing to do some Java exercises: Java AWT Robot :-)

Revision history for this message
RaiMan (raimund-hocke) said :
#5

... and the SikuliX class KeyboardLayout.

Can you help with this problem?

Provide an answer of your own, or ask Murmandamus for more information if necessary.

To post a message you must log in.