garreth malo wrote:
>> Im looking into ways to create/simulate mouse events (or key events) in
> KDE - hopefully using c/c++.
> Does anyone know if this is possible?
>> The mouse events needed are Right Click, Left Click and if possible an
> actual cursor move.
> I know this is possible in Win32, visual c++ using SetCursor(x,y) for
> mouse movement and something like VM_LButtonDown for left click.
>> I have read up - briefly - on QT and GTK and their use of widgets and the
> ability to control certain
> events *within* a user created widget, however i need to be able to create
> these 'simulated' mouse events
> for KDE in general if possible, but if not at least throughout OpenOffice.
>> Can anyone point me in the right direction or let me know if this is even
XSendEvent (the xlib call) or Xse (the command line interface to XSendEvent)
should be able to do what you want, unless there is an issue with the app
ignoring synthetic events, in which case, this approach is doomed.
If you're really bored, you could write / find yourself a serial port mouse
emulator and given an appropriate loopback cable, implement a software fake
Or if you're so inclined, write yourself a kernel driver for a fake mouse.
You just need to figure out the read protocol and ioctl calls, which are
just standard serial port ones afaik.
Either of the later approaches is immune to the synthetic events problem,
cause it really is a mouse as far as X knows.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!