Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!ora!bloom-beacon!dont-send-mail-to-path-lines From: mouse@lightning.mcrcim.mcgill.EDU (der Mouse) Newsgroups: comp.windows.x Subject: Re: Program to send events to arbitrary application? Message-ID: <9106260442.AA01544@lightning.McRCIM.McGill.EDU> Date: 26 Jun 91 04:42:20 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 35 > Is there a program out there that will send an arbitrary event (e.g. > a "fake" mouse button press) to an arbitrary window? Look at XSendEvent; it's about the closest thing the core protocol provides. > I would like to send an arbitrary event to a window from a shell, and > have that event processed by the program as if it had come to that > window normally. I don't know of any wrapper program, though it shouldn't be hard to write one. If you use XSendEvent, note that the receiving client can tell that the event is a fake event. Some programs (eg xterm) can be set to ignore such events; some of them may do this by default (offhand, I don't know whether xterm is such a one). Other programs ignore this bit and process the event normally.... I think there is an extension (I forget the name, though rummaging in my memory turns up "xtrap" as being possibly significant) which is designed specifically to do journalling. If this is right, and you can find a copy, that should be capable of doing what you want. > BTW, I'm using OpenWindows 2.0 on a Sun Sparc 1+. You may find you have to switch to the MIT server (which will not render most OW clients useless, though a few that use NeWS will of course break). The reason for this is that if you have to install an extension, you'll need source to your server. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu