emacs-devel
[Top][All Lists]
Advanced

[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: Tue, 24 Aug 2021 17:30:03 +0200

On Tue, Aug 24, 2021 at 01:00:14PM +0200, tomas@tuxteam.de wrote:
On Tue, Aug 24, 2021 at 11:17:41AM +0200, Ergus wrote:

[...]

Then if you have it, could you tell what escape sequence it sends throw
Xterm by default? If you could do the same with urxvt will be very nice
;)

Sure :)

I tried both. My methodology is to run 'cat | hexdump -C' in each of
xterm and urxvt and to terminate input with CTRL-D.

I tested the methodology itself by trying some keys where I more or
less knew what to expect ("a", <ENTER>, but also <F2>).

The result is... nothing.

This may sound disappointing, but then, xterm tries to pretend being
a VT220, and those had no "print" key.

OTOH, it would be subestimating the folks at MIT Project Athena to
assume that would not be configurable. Hard-coding this wouldn't
have made sense to them.

So yes, for xterm at least (but I think for urxvt, too), you can
configure that with X Resources. This one [1] looks as if there
were hope as long as there is a keysym. No time to try it out
at the moment, though.

Whether the application (Emacs) running "in" the xterm can change
that dynamically (or has to tell the user to do that for it ;)
is the next interesting question :-)

Cheers
[1] http://www.fifi.org/doc/xterm/xterm.faq.html#how2_fkeys
  which is, BTW, a wonderful resource in things xterm.
- t


Hi!

Thanks for the link! Of course we can emulate anything in xterm. The
question is what xterm does by default? and why we bound the menu
sequence to [print] instead of [menu] if emacs internally uses [menu]
for execute-extended-command?

If xterm assumes it is a VT220; then we must assume the same when using
it by default (until we implement a more complex API to ask
xterm... (but that may be inefficient and probably don't worth it for
such a detail).

Sometimes emacs assumes there is a [menu] key but then in xterm the same
key is interpreted as [print] by emacs. So a very comfortable key (for
those who have it) that we can't use consistently.

Part of my intention is to minimize the "special" customization required
when using xterm+emacs (either in Xdefaults or in init.el); any fancy
more specific customization can be made latter by the user when he gets
familiar with the rest of the environment (GNU/Linux, xterm, emacs,
Elisp, the command line interface, the OS configuration system...) for
new users it is like getting into Narnia the fist week/month.

I expect that most of the emacs features work and behave as similar as
possible when using the xterm, tty or gui without customization,
everything out of the box.


reply via email to

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