[linux-elitists] fake X button event

Don Marti dmarti@zgp.org
Thu Nov 14 11:17:28 PST 2002


begin Jason Spence quotation of Thu, Nov 14, 2002 at 03:50:56AM -0800:

> See my pingx program on freshmeat for some template code you can use
> to call XSendEvent.  I'll even do it for you if you'll buy me dinner :)

XSendEvent apparently doesn't fool X clients as well as the XTest
stuff does, according to Jim Gettys:
http://handhelds.org/pipermail/ipaq/2000-October/001737.html

Clients can tell when they're getting events from XSendEvent.

As soon as I started writing my own program to do this, I
found this code example showing use of XTestFakeButtonEvent:
http://www.mail-archive.com/fvwm@hpc.uh.edu/msg01118.html

and even better, the xautomation project, which includes a useful
XTest-based tool called xte that will do these events as well
as others.  It also includes "visgrep" to find images on screen so
you don't have to just click by position.

http://hoopajoo.net/projects/xautomation.html

-- 
Don Marti
http://zgp.org/~dmarti
dmarti@zgp.org
KG6INA



More information about the linux-elitists mailing list