← Back to team overview

sikuli-driver team mailing list archive

[Question #404260]: keydown() doesn't work

 

New question #404260 on Sikuli:
https://answers.launchpad.net/sikuli/+question/404260

My code :

wait(2)

click(some area)   #click inside a notepad (empty) window

wait(0.5)

keyDown("o")
wait(6.3)
keyUp("o")
wait(1)
keyDown("o")
wait(4.9)
keyUp("o")
wait(1)
keyDown("o")
wait(3.6)
keyUp("o")
wait(1)
keyDown("r")
wait(2)
keyUp("r")
wait(1)


So, instead of having something like this : "oooooooooooooooooooooooooooooooooooooooooooooooooooooooorrrrrrr" (it doesn't matter how it would actually look like) I get this : "ooor".

So, instead of keeping "o" and "r" down, it seems it just types it once!

A little backstory :

The above is part of a code for playing a game. "o" is accelaration, "r" is reset. 
I have written my code for the same game in my laptop and it works perfectly.
When I transfered my code to my friend's PC, it simply doesn't work. 
When I wanted to undersatand why it wouldn't work, I thought to test it on notepad.
I tried for almost 3 hours to find any solution but nothing.
Right now, I tried the code on my laptop and it worked. I am trying the above segment on notepad and I get the exact same resaults as on my friend's PC.

Any ideas?

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.