Re: [dwm] Fake key in xterm

From: Anselm R Garbe <garbeam_AT_gmail.com>
Date: Tue, 31 Mar 2009 14:54:42 +0100

2009/3/31 Tinou <tinoucas_AT_gmail.com>:
> In vim, to jump to a tag (tjump) ctrl-] is used. I'm french and using a
> french azerty keyboard. On windows or osx, ctrl-] can be acheived by
> pressing ctrl-$ but not in xorg, since ^$ doesn't seem to exist.
>
> ctrl-$ is simpler because to produce a ']' I need to use one more
> modifier: "altgr".
>
> So, to reproduce the windows/osx behaviour, I though I could grab the
> key ctrl-$ in dwm and then send to the selected window the key
> combination ctrl-altgr-].
>
> The attach code does this and it works perfectly in gvim or
> rxvt-unicode.
>
> But not in xterm (nor uxterm).
>
> My question is: how can I make this work in xterm ?

The reason is that you are using XSendEvent and that xterm has got a
protection against synthetic key events by default (otherwise a
malicious app could send rm -rf /\n to a xterm window).

To allow synthetic key events, set something like:

XTerm*allowSendEvents: True

Kind regards,
Anselm
Received on Tue Mar 31 2009 - 13:54:42 UTC

This archive was generated by hypermail 2.2.0 : Tue Mar 31 2009 - 14:00:05 UTC