How can I control the mouse and keyboard in Python?
The idea is to do the same as the Robot() class in Java. Be able to say: move the mouse from here to here, click there, write that whatever is on the screen.
For Windows there is win32api but I'm using mainly Linux.
For Linux there is Xlib but does it works for keyboard as well? (found only reference to the mouse)
Is there a cross-platform solution? (Linux, Windows and even OS X would be the great.)
I use dogtail (https://fedorahosted.org/dogtail/) to do such things, using this I have created an automated testing framework for my Linux(Ubuntu) app. That framework clicks buttons and types into text fields.
see the gedit example, https://fedorahosted.org/dogtail/browser/examples/gedit-test-utf8-procedural-api.py
So just use dogtail e.g
dogtail.rawinput.click(100, 100)