SikuliX-IDE-1.0-Win32Beta500 keyDown bug

Asked by rob

i am noticing that keyDown doesnt work the same with the new beta.
for example:
keyDown(Key.CTRL + 'a' + 'v')
keyUp()

just types in a 'v' instead of pasting. is anyone else noticing this?

Question information

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

What should that do or what does it in the current version?

The function just presses and holds CTRL, then a and then v
Then it releases CTRL, then a and then v

Revision history for this message
rob (reg82) said :
#2

well for some reason my r930 version is no longer opening. so it seems like i have bigger problems. ill report back if i still have the same problem once i get the old version to run again.

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

Try this: delete the registry key for the Sikuli prefs as mentioned in faq 2005.

I will check, wether there is a problem on Windows with the fact, that both versions are using the same registry branch.

Revision history for this message
rob (reg82) said :
#4

deleting the registry key for the sikuli prefs got the r930 ide running again, thanks RaiMan.
i ran a script that should have copied some text from a program, typed 'HA' and then pasted the text.
it works as i expect in the r930 ide but in the beta only the text was copied, 'HA' was not typed in. i think maybe keyUp() was the issue but i'm not sure.
here is a snippet of the code:

keyDown(Key.CTRL +'c')
keyUp()
setROI(Region(877,199,1015,289))
click("Edit.png")
wait("AccountNumAc.png", 20)
drag(Pattern("1367427116959.png").targetOffset(-113,-28))
dropAt("AccountNumbe-1.png")
type('HA')
keyDown(Key.CTRL + 'v')
keyUp()

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

type('HA') works for me.
What is shown in the log? --- should be: [log] TYPE "HA"
May be a short wait is needed after the drag.

BTW:
type('c', KeyModifier.CTRL)

is better than

keyDown(Key.CTRL +'c')
keyUp()

since it works more than the shortcut is defined:
- press and hold CTRL
- press c
- release CTRL

this is exactly what the above type does.

or this:
keyDown(Key.CTRL +'c')
keyUp('c')
keyUp()

Revision history for this message
rob (reg82) said :
#6

ok i will try it. thank you.