Closed GoogleCodeExporter closed 8 years ago
I'm afraid these are bugs with X event handling and there's nothing I can do
about either of them.
Original comment by cdekter
on 10 Jun 2011 at 2:25
[deleted comment]
I encountered the same problem but turns out there is no bug here - it works
but too fast. So to make this actually work I had to add sleep(some_short_time)
after press_key() and before release_key(). For example this code works for me:
from time import sleep
wait = 0.2
keyboard.press_key("<alt>")
sleep(wait)
mouse.click_relative_self(0, 0, 1)
sleep(wait)
keyboard.release_key("<alt>")
By the way, I have to use sleep very often in my scripts, otherwise many things
will not work as expected. I think this worth adding to the autokey FAQ - if
something does not work as expected then try to add sleep.
Original comment by resea...@science.su
on 5 Jan 2014 at 12:44
Original issue reported on code.google.com by
deskgl...@gmail.com
on 10 Jun 2011 at 1:15