[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xterm [menu] key definition

From: Ergus
Subject: Re: xterm [menu] key definition
Date: Wed, 25 Aug 2021 10:58:10 +0200

On Tue, Aug 24, 2021 at 10:53:55PM -0400, Stefan Monnier wrote:
Please give a look to my last email to Eli. I attached an answer from
the xterm maintainer respecting to that. That included a xev output and
his comment about this.
xterm does not map either [print] or [menu] in terminfo but maps
kf16=\E[29~ (that's why urxvt mapped S-<f6> == <f16> == [menu] according
to their convention)

So, IIUC he's saying that xterm emits `\E[29~` not for `Print` nor for
`Menu` but for `F16`, right?  So maybe we should have

   (define-key map "\e[29~" [f16])

and then remap `f16` to `menu` maybe even via `S-f6`, but we already
have a remapping of `f16` to `S-f4`, so it looks like a big pile of mess.

in xterm normally `f16` == `S-f4` because the last fkey is 12 not
10. The one with the `wrong` (or less standard) convention here is
urxvt. So our current remapping is fine in this case

The real question is why emacs mapped \E[29~ to [print] in xterm;

This dates back to:

   commit 92abb02b9b65b95807fd8fdccad10feed0dd3a96
   Author: Karl Heuer <kwzh@gnu.org>
   Date:   Fri Jun 9 02:31:33 1995 +0000

       Initial revision

so maybe some kind of xterms back then did that?

FWIW, the f16 => S-f4 mapping dates back to:

   commit 35b1b8abe3d3833ecb4b4cee75b7340ffb707d65
   Author: Dan Nicolaescu <dann@ics.uci.edu>
   Date:   Tue Apr 26 05:56:22 2005 +0000

       * NEWS: Mention xterm key bindings.

       * term/xterm.el (function-key-map): Fix strings for
       {C,S,A,C-S}-f[1-4]. Use substitute-key-definition to bind

And it is actually fine ;)

Do you have a "menu" key which emits the `Menu` X11 event and for which
your terminal emits `\E[29~`?
Indeed. I have the same behavior the xterm maintainer described for his

If so, which terminal is that (details
like the version may be relevant and maybe the OS or environment)?


xterm: 368 (but very old versions have the same behavior), OS: Debian,
Arch Linux and Open Suse different versions.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]