[Top][All Lists]

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

Re: xterm [menu] key definition

From: Olaf Rogalsky
Subject: Re: xterm [menu] key definition
Date: Wed, 25 Aug 2021 16:01:52 +0200
User-agent: mu4e 1.4.15; emacs 28.0.50

As a heavy TUI emacs and xterm user I can add to this:

Stefan Monnier writes:

>> -    (define-key map "\e[29~" [print])
>> +    (define-key map "\e[29~" [menu])
> This might be right, but we need some more concrete evidence that indeed
> `xterm` maps `Menu` to `\e[29~` by default and/or that `Print` is not
> mapped to `\e[29~` by default, or something like that.
> That info should be available in `xterm`s source code or something like
> that (I hoped that it would be visible in the `app-defaults/XTerm` file
> but no).
>         Stefan
Nowhere in the xterm sources I can find a reference to the XK_Print key
symbol. This is consistent with the obeservation, that xterm does not
act upon a PrtScn keypress / release.

On the other side, in line 1465 of xterm-snapshot/input.c the XK_Menu
key is bound to "\e[29~"
-- snip--
     MAP(XK_Menu, 29);
-- snap --

In chapter 2 on page 6 of the "VT220 Technical Manual (EK-VT-220-TM-001)" 
it is explicitely mentioned, that the "Print Screen" key has a predetermined
-- snip --
Most of the top-row function keys (Figure 2-7), have functions
assigned to them by the application software in use. The following
top-row function keys have predetermined values.

* HOLD SCREEN key -- ...

* PRINT SCREEN key -- sends the text on the screen to the
  printer (CTRL-PRINT SCREEN sets or resets auto print

* SET-UP key -- ...
-- snap --

Further, the VT220 does not have a "Menu" key, but it has a "Do" key,
which sends "\e[29\" according to table 3-4 of the VT200 Programmer
Reference Manual".

To sum it up:
* Xterm ignores the "Print" key completely (except, if one defines an
  appropriate key translation).
* Xterm sends "\e[29~" after a "Menu" key press to the application.
* VT220 terminals immediately print the screen after a "Print" key press
  and do not report the key to the application.
* VT220 terminals do not have a menu key.
* VT200 terminals report "\e[29~" after a "Do" key press.


reply via email to

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