X/Linux mouse_event (like in win32api)

A

Atila Olah

Hello everyone.
I would like to be able to emit a mouse click on my xgl/compiz
desktop, like I used to do in Windows:

win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN, x, y, 0)
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP, x, y, 0)

I installed Python and pywin32 in wine and they both work, but I
cannot extend the mouse emulation to my X desktop.
Is there a way to interact directly with the X server (or with the
kernel?) to simulate a click? And if it can't be done in Python, where
should I go?

Thank you in advance for your replies.
 
J

Jorgen Grahn

Hello everyone.
I would like to be able to emit a mouse click on my xgl/compiz
desktop, like I used to do in Windows: ....
Is there a way to interact directly with the X server (or with the
kernel?) to simulate a click? And if it can't be done in Python, where
should I go?

This is probably best done in Xlib, the lowest-level X11 API. See the
XSendEvent() call, and feed it to Google for more information.

I think there is a Python interface to Xlib, although I haven't used it.

/Jorgen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top