emacs-devel
[Top][All Lists]
Advanced

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

Re: New Context Menu


From: Ergus
Subject: Re: New Context Menu
Date: Tue, 24 Aug 2021 18:05:52 +0200

On Tue, Aug 24, 2021 at 06:44:44PM +0700, Yuri Khan wrote:
On Tue, 24 Aug 2021 at 15:01, Ergus <spacibba@aol.com> wrote:

>> lk201.el:35:    (define-key map "\e[29~" [menu])
>> rxvt.el:67:    (define-key map "\e[29~" [S-f6])
>> xterm.el:353:    (define-key map "\e[29~" [print])
>>
>> where "\e[29~" is the sequence the menu key sends. So maybe you could
>> use [S-f6] instead?
>>
>> That will make it work out of the box in urxvt.

Maybe I miss explained myself. The idea to put it in [S-f6] is to make
the context menu work with the [menu] button out of the box when
available in urxvt (and on xterm if fixed).

That would be wrong. Better:

It is not wrong actually. Because keys like [menu] require an
alternative for those that don't have such a key. That's why in some
emulators they are the same sequence than some other complex
combinations like S-<f6> or C-S-<f6>; or some keys not present in our
keyboards anymore (like <f15>) but can be emulated with combinations.

They are intended to be more like shortcuts; and when not, we use to
bind to another combination any way. See the vt220 or the vt100
specifications for example.

* Push for terminfo to include a string capability that indicates the
sequence sent by the Menu key. Push for the terminfo database to
include that capability for major terminal emulators.

I already discussed this with the xterm developer, but the current
translation is direct and does not rely on tricks in the emulator
side. Xterm actually can distinguish between them, but I can't force
every emacs user to use xterm because it is very limited in many
aspects.

* Push for rxvt to change its Menu sequence to something different
from Shift+F6, and submit that sequence to the terminfo database.

* In rxvt.el, change \e[29~ to the new rxvt Menu sequence.

This is somehow like create a key sequence to distinguish between 2+2
and 4... Or modifying all the universe around just because we want pi to
be 4 instead of 3,14.

Even better:

* Use a terminal emulator that lets you distinguish all key combinations.

Actually the recommended terminal emulator to work with emacs is
xterm. It is the most compatible and actually was a topic of a previous
discussion/question I did long time ago.

xterm allows to distinguish between S-<f6> and the [menu] sequence, they
are different. But urxvt and many others don't; so that will imply that
in urxvt, the context menu will take at least 3 keys when bound to
[S-f10]. Because binding to [menu] will also take [S-f6]. That's what I
want to avoid. Also because S-<f10> is already taken.

So again binding it to S-<f6> will solve all the issues with a simpler
trick. 1) not replace the current S-<f10> binding, 2) take only one
S-<f#> binding 3) make the [menu] key work in urxvt the same as with
gui.



reply via email to

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