#534192 xterm: Enable metaSendsEscape by default?

Package:
xterm
Source:
xterm
Description:
X terminal emulator
Submitter:
Samuel Thibault
Date:
2014-06-21 22:06:09 UTC
Severity:
wishlist
#534192#5
Date:
2009-06-22 11:46:00 UTC
From:
To:
Hello,

By default, metaSendsEscape is set to false, which makes the meta
key useless by default in readline-based programs, since the default
readline configuration is to enable 8bit-clean mode.  Shouldn't we
enable metaSendsEscape by default?  What is the use of meta setting the
8th bit?  Just stream optimization?

Samuel

#534192#8
Date:
2009-08-09 23:23:14 UTC
From:
To:
Two points:

	a) metaSendsEscape is a workaround (for keyboard settings where
	   one wishes to use the meta key in cases where alt is not preferred).

	b) "8bit-clean" mode as applied to readline requires some explanation.

To digress, man terminfo:

       If the terminal has a ``meta key'' which acts as a shift  key,  setting
       the  8th  bit  of any character transmitted, this fact can be indicated
       with km.  Otherwise, software will assume that the 8th  bit  is  parity
       and  it  will usually be cleared.  If strings exist to turn this ``meta
       mode'' on and off, they can be given as smm and rmm.

and man xterm

       metaSendsEscape (class MetaSendsEscape)
               If "true", Meta characters (a character combined with the  Meta
               modifier  key) are converted into a two-character sequence with
               the character itself preceded by ESC.  This applies as well  to
               function  key control sequences, unless xterm sees that Meta is
               used in your key translations.   If  "false",  Meta  characters
               input  from the keyboard are handled according to the eightBit-
               Input resource.  The default is "false."

xterm does in fact toggle the eightBitInput resource setting when the terminfo
smm/rmm capabilities are sent.  But if your meta key does in fact correspond
to what xterm thinks is the meta key (inference is needed since X doesn't want
to provide that detail), then setting metaSendsEscape will cause your keyboard
to ignore the feature for inputting codes 128-255.

(I'm aware that European keyboards have many of the Latin-1 codes, depending
on national flavors, but that's not the case elsewhere).