From: Ergus <spacibba@aol.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: juri@linkov.net, monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: xterm [menu] key definition
Date: Tue, 24 Aug 2021 22:23:40 +0200 [thread overview]
Message-ID: <20210824202340.begmfw4xwzud6pga@Ergus> (raw)
In-Reply-To: <831r6iwy4p.fsf@gnu.org>
On Tue, Aug 24, 2021 at 08:28:22PM +0300, Eli Zaretskii wrote:
>> Date: Tue, 24 Aug 2021 18:40:36 +0200
>> Cc: Stefan Monnier <monnier@iro.umontreal.ca>,
>> emacs-devel <emacs-devel@gnu.org>
>> From: Ergus via "Emacs development discussions." <emacs-devel@gnu.org>
>>
>> Just to clarify.
>>
>> What I am proposing is as simple as the attached patch.
>>
>> I won't expect any complain about the change, but if so we then may
>> decide to do something like an alias between [menu] and [print]:
Hi Eli:
It is fine for me. Actually I didn't add the [PATCH] flag to the Subject
of the message because the patch was only to illustrate the proposal
with specific code, not more and more words and explications.
>
>Look, we need some kind of evidence that this is TRT, some document
>that describes that key, or explains why urxvt and xterm behave
>differently, or who and why made the current code as it is. We cannot
>make this change in xterm.el just because you think it's right and it
>suits your personal system configuration. The code we have wins by
>default, unless you can come up with a clear reason explaining why it
>is wrong.
>
I am not saying the current code is wrong. Just that the so called
[print] key does not exist while the same key is seen as [menu] in gui.
I expect that emacs user gets the similar behavior when they press the
menu key. Either in tty, tui or gui... or at least as consistent as
possible. (either redefining ^[[29~ as [menu] or binding the context
menu to [print]... I have already this on my config... obviously I
prefer the first alternative)
I already wrote to Thomas Dickey (xterm maintainer) some days ago about
this:
=================================
On Wed, Aug 18, 2021 at 08:38:44PM -0400, Thomas Dickey wrote:
>On Wed, Aug 18, 2021 at 09:46:53PM +0200, Ergus wrote:
>> Hi:
>>
>> I use emacs and I have noticed that when using xterm and I press the
>> menu key, emacs is detecting <print> instead. (emacs just added a
>> context menu and it could be probably bind to the menu key)
>>
>> cat shows that xterm sends ^[[29~ But I can't find information if this
>> is the right one or how to debug this.
>
>hmm - I didn't notice, but in a quick check the key which I guessed is
>"menu" (between the Windows key and the Ctrl key on the right-side of
>my keyboard) does send ^[[29~ and xev says that's "Menu":
>
>--------------------------------------------------------------------------------
>KeyPress event, serial 34, synthetic NO, window 0xc00001,
> root 0x111, subw 0xc00002, time 60750193, (37,34), root:(37,57),
> state 0x0, keycode 118 (keysym 0xff67, Menu), same_screen YES,
> XLookupString gives 0 bytes:
> XmbLookupString gives 0 bytes:
> XFilterEvent returns: False
>
>KeyRelease event, serial 34, synthetic NO, window 0xc00001,
> root 0x111, subw 0xc00002, time 60750321, (37,34), root:(37,57),
> state 0x0, keycode 118 (keysym 0xff67, Menu), same_screen YES,
> XLookupString gives 0 bytes:
> XFilterEvent returns: False
>
>KeyPress event, serial 34, synthetic NO, window 0xc00001,
> root 0x111, subw 0xc00002, time 60750537, (37,34), root:(37,57),
> state 0x0, keycode 118 (keysym 0xff67, Menu), same_screen YES,
> XLookupString gives 0 bytes:
> XmbLookupString gives 0 bytes:
> XFilterEvent returns: False
>--------------------------------------------------------------------------------
>
>But in the terminal description, I'd not assigned anything to that.
>It's not a numbered function key, and terminfo doesn't have a standard
>"menu" key (I could add one, but had overlooked this :-).
>
>Emacs does. Someone was telling me recently about something related
>to xterm, so I've a current source. In that, I see this, with grep:
>
>lisp/term/lk201.el:35: (define-key map "\e[29~" [menu])
>lisp/term/xterm.el:353: (define-key map "\e[29~" [print])
>lisp/term/rxvt.el:67: (define-key map "\e[29~" [S-f6])
>
>which is kind of old (git blame tells me):
>
>0ba6bcb1d6e (Stefan Monnier 2007-09-07 19:47:46 +0000 353)
>
>but the first match shows the binding that you'd like to have.
>
>I don't use emacs, but suppose that you can add that definition
>to your custom settings, and get the menu that you expect.
>
>--
>Thomas E. Dickey <dickey@invisible-island.net>
>https://invisible-island.net
>ftp://ftp.invisible-island.net
=================================
>The rest of the change, i.e. binding the menu to the <menu> key, is
>fine by me. But not the change in xterm.el, not without a very good
>explanation.
>
>Okay?
The other change I propose is the S-<f6> instead of S-<f10> and for that
we have all the evidence that urxvt binds the same escape sequence to
S-<f6> (since we do:
lisp/term/rxvt.el:67: (define-key map "\e[29~" [S-f6])
and "\e[29~" is what the menu key sends by default)
Otherwise we will need to request to all the compatible terminals around
to update their terminfo.. a very long process that will delay for years
until all the systems in all the servers will be updated.
Best,
Ergus
next prev parent reply other threads:[~2021-08-24 20:23 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210819024728.kgnf6jmpakqdto4p.ref@Ergus>
2021-08-19 2:47 ` xterm [menu] key definition Ergus
2021-08-23 17:53 ` Ergus
2021-08-24 6:37 ` Juri Linkov
2021-08-24 8:19 ` Ergus
2021-08-24 8:34 ` tomas
2021-08-24 9:17 ` Ergus
2021-08-24 10:03 ` Andreas Schwab
2021-08-24 11:00 ` tomas
2021-08-24 15:30 ` Ergus
2021-08-25 7:06 ` tomas
2021-08-25 9:32 ` Ergus
2021-08-25 10:47 ` tomas
2021-08-25 11:31 ` Ergus
2021-08-26 5:47 ` chad
2021-08-26 7:14 ` tomas
2021-08-26 8:16 ` Andreas Schwab
2021-08-24 8:34 ` Andreas Schwab
2021-08-24 9:07 ` Ergus
2021-08-24 22:05 ` Stefan Monnier
2021-08-25 6:38 ` tomas
2021-08-25 9:04 ` Ergus
2021-08-24 16:40 ` Ergus via Emacs development discussions.
2021-08-24 17:28 ` Eli Zaretskii
2021-08-24 18:09 ` Juri Linkov
2021-08-24 20:23 ` Ergus [this message]
2021-08-25 11:27 ` Eli Zaretskii
2021-08-25 11:53 ` Ergus
2021-08-24 22:16 ` Stefan Monnier
2021-08-24 23:20 ` Ergus
2021-08-25 2:53 ` Stefan Monnier
2021-08-25 8:58 ` Ergus
2021-08-25 14:13 ` Stefan Monnier
2021-08-25 11:34 ` Eli Zaretskii
2021-08-25 22:41 ` Stefan Monnier
2021-08-26 6:55 ` Eli Zaretskii
2021-08-26 7:17 ` Ergus
2021-08-26 7:23 ` Eli Zaretskii
2021-08-26 12:52 ` Ergus
2021-08-26 13:48 ` Eli Zaretskii
2021-08-26 13:59 ` Stefan Monnier
2021-08-26 14:51 ` Andreas Schwab
2021-08-26 15:52 ` Eli Zaretskii
2021-08-25 7:10 ` tomas
2021-08-25 8:02 ` Andreas Schwab
2021-08-25 6:36 ` Yuri Khan
2021-08-25 7:17 ` tomas
2021-08-25 9:00 ` Ergus
2021-08-25 14:01 ` Olaf Rogalsky
[not found] ` <87k0kcovp4.fsf@no.workgroup>
2021-08-25 12:09 ` Gregor Zattler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210824202340.begmfw4xwzud6pga@Ergus \
--to=spacibba@aol.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=juri@linkov.net \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).