On Mon, Jun 25, 2018 at 02:18:44PM +0100, Klaus Ethgen wrote: > Hi Folks, > > I try to get some automatic button press working but failed so far. > > What I want to archive is to klick the middle mouse button in a xterm > instance to paste some text. Alternative do shift-Insert. > > What I tried so far: > - `FvwmCommand 'FakeClick depth 3 press 2 release 2'` (alternative with > some waiting period in between) > - `FvwmCommand 'ThisWindow FakeClick depth 3 press 2 release 2'` > - `FvwmCommand 'ThisWindow FakeKeypress modifiers 6 press Insert'` > - even `FvwmCommand 'ThisWindow FakeKeypress a'` > > None worked. > > Any idea how to archive the goal preferred with fvwm internal stuff?
You need to tell xterm to listen to sendevents (allowSendEvents) since synthetic key events are an inherent security risk. Even despite turning this on, there's no guarantee of this working, and certainly not for any other application. As far as your copy/paste situation goes, use xsel(1) or some such instead. Then you wouldn't need to worry about this notion of keypresses at all. -- Thomas Adam