emacs-devel
[Top][All Lists]
Advanced

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

Re: xterm [menu] key definition


From: tomas
Subject: Re: xterm [menu] key definition
Date: Wed, 25 Aug 2021 12:47:17 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Aug 25, 2021 at 11:32:12AM +0200, Ergus wrote:
> On Wed, Aug 25, 2021 at 09:06:40AM +0200, tomas@tuxteam.de wrote:

[...]

> >I wouldn't expect an "xterm API". The "API" are the escape sequences :)
> >
> I meant an api to ask xterm about modifyFunctionKeys value for a general
> solution.

I see.

> For this specific case kf16=\E[29~ unconditionally; so we don't care.

FWIW, I am surprised about the correspondence "F16" to "menu". For
one, most (PC) keyboards only go up to 12 [1], for the other, CUA [2]
(the only "written" standard I can come up on those things) states
that "menu" is F10. Probably some popular application started with
it or something.

> >When you say "emacs assumes" you are referring to some "GUI guts"?
> >
> I am referring to what emacs understand for the same key on gui or xterm.

OK.

> >>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.

The best, IMO, would be to agree upon whatever escape sequences for
those newer keys and convince terminal folks to implement that. Guessing
around (aka "F16" == "menu") is only going to make the tangle deeper.
It is deep already :)

> >The lowest common denominator would be to assume that there is no
> >"print" (aka PrintSc) key, same for "menu", more so for "windows".
> >
> I started the thread asking because now I understand that in general the
> [menu] key seems to emit the same than <f16>. What I don't know is if
> the PrintSc does the same with a another key.

See above.

> The other think clear now is that \E[29~ is NOT [print]. It is either
> <f16> (from xterm's source code and terminfo) or [menu] (as menu key
> seems to emit the same X event in all the cases.)
> 
> So [menu] in general seems to be a shortcut for <f16>? Probably you know
> better than me about this conventions or where can be found in some X
> sources?

See above. I didn't know that and I can't even find hints about who
has come up with it. If xterm maps both to the same escape sequence,
perhaps one avenue could be to research whence that commit comes and
ask the person whodunit. Perhaps she's still around :-)

Who knows... perhaps that was the labeling on one particularly venerated
workstation at some MIT lab ;-)

> >>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.

Don't get me wrong, I understand your goal and think it's a laudable
one, but the layers you are talking to didn't know a "menu" key (or
a "print" key, for that) exists when they were born. Some people
(me included) don't have yet a "menu" key on their keyboards (nor an
F16 key). So that kind of keyboards is around and will be with us
for the next, say, 5 to 10 years. By then, we'll have a new key,
this time it'll be Google's vanity key, say "search" [4].

Relying too much on a "menu" key being there doesn't look to me like
a smart move just yet.

But, of course, getting those exotic keys into the different terms
(I'd try to include the Linux console) seems a worthy goal in
itself.

Perhaps a smart move would be to get a Linux distro (e.g. Debian)
on board? They go to some lengths in making keyboard behaviour
uniform across worlds (e.g. xterm/Linux console).

Cheers

[1] https://xkcd.com/670/
[2] https://en.wikipedia.org/wiki/Common_User_Access
[3] It's a refurb Thinkpad X230, which was introduced around 2012.
   So it's not /quite yet/ a museum piece. The last ones in refurb
   shops seem to have been flushed out pretty recently, possibly
   accelerated by pandemics.
[4] I should set up a bet.

 - t

Attachment: signature.asc
Description: Digital signature


reply via email to

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