Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!tcdcs!bofin!cjmchale From: cjmchale@cs.tcd.ie (Ciaran McHale) Newsgroups: comp.windows.x Subject: Re: Help need for XSendEvent Message-ID: <1991Apr9.105549.15617@cs.tcd.ie> Date: 9 Apr 91 10:55:49 GMT References: <10961@ncar.ucar.edu> Organization: DSG, Dept. of Comp. Sci., Trinity College, Dublin. Lines: 27 In <10961@ncar.ucar.edu> thor@thor.atd.ucar.edu (Richard Neitzel) writes: > I am trying to write an application that needs to send text >strings to an xterm. [...] However, the xterm does not respond by >getting the selection. I've tested the events sent with xev, so I am >certain that xterm is getting them - so why isn't it getting the >selection. An important point to note about sending events is that the X server will force the send_event field to True. Xterm examines this field and if set will (by default) discard the event rather than process it. This is to prevent people from "sending" harmful key sequences to an xterm. For example, sending the string "rm -f *\n" to somebody else's xterm is not a nice thing to do. You can tell xterm to process events which have been sent by setting one of its resources (called "allowSendEvents") to True. This can be done in a resources file or can be toggled on/off by choosing the appropriate option in the menu displayed by pressing the key and the 1st mouse button. Ciaran. -- Ciaran McHale "There's a lot to be said for verbosity." ---- Department of Computer Science, Trinity College, Dublin 2, Ireland. \ / Telephone: +353-1-772941 ext 1538 FAX: +353-1-772204 \/ Telex: 93782 TCD EI email: cjmchale@cs.tcd.ie