Debian Bug report logs - #651035
please decide how terminals should report Alt+letter combinations

version graph

Package: debian-policy; Maintainer for debian-policy is Debian Policy List <debian-policy@lists.debian.org>; Source for debian-policy is src:debian-policy.

Reported by: Jonathan Nieder <jrnieder@gmail.com>

Date: Mon, 5 Dec 2011 07:27:06 UTC

Severity: wishlist

Found in version debian-policy/3.9.2.0

Done: Jonathan Nieder <jrnieder@gmail.com>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, rrt@sc3d.org, xterm@packages.debian.org, kterm@packages.debian.org, xvt@packages.debian.org, mlterm@packages.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#651035; Package debian-policy. (Mon, 05 Dec 2011 07:27:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
New Bug report received and forwarded. Copy sent to rrt@sc3d.org, xterm@packages.debian.org, kterm@packages.debian.org, xvt@packages.debian.org, mlterm@packages.debian.org, Debian Policy List <debian-policy@lists.debian.org>. (Mon, 05 Dec 2011 07:27:09 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: submit@bugs.debian.org
Subject: please decide how terminals should report Alt+letter combinations
Date: Mon, 5 Dec 2011 01:23:58 -0600
Package: debian-policy
Version: 3.9.2.0
Severity: wishlist
X-Debbugs-Cc: Reuben Thomas <rrt@sc3d.org>, xterm@packages.debian.org, kterm@packages.debian.org, xvt@packages.debian.org, mlterm@packages.debian.org

Hi,

Reuben Thomas reported[1]:

> Please set eightBitInput: false by default so that, as in konsole and
> gnome-terminal, Alt+letter combinations work in, for example, bash,
> out of the box.

Then there was a lot of discussion.

I expect you understand the issues better than I do, but just to have
something to pick at, here's an xterm-centric summary.

"meta" and "alt" are typically the same key[2].  From now on, I will
assume that "meta" and "alt" are the same key, although I understand
that in some configurations they are not so.

There are two conventions for reporting that the meta modifier was
held: (a) precede the reported keypress with ESC, or (b) set the high
bit on the reported keypress.  The standard way to switch between
conventions is the eightBitInput resource[3].

Applications have some control of which convention is used: the
terminfo smm/rmm capabilities allow an application using the terminal
to toggle eightBitInput, overriding the user[4].

Unfortunately, applications have no standard way to discover the most
important thing, which is whether when the human operator pressed
"alt" she intended to get the "meta" behavior after all.  It is also a
common shortcut for typing alternate characters (e.g., alt+0 for the
a degree sign).

Proposal:

 i.   All terminals should send ESC for meta by default.

 ii.  The terminfo entries used for terminals provided in Debian
      should not advertise the smm/rmm capabilities.

 iii. When the smm/rmm capatibilities are not advertised, applications
      should understand that ESC means "meta" and if the user overrides
      the terminal behavior to set the high bit instead, it means that
      the input represents "alternate character", not "meta".

(ii) allows applications to play tricks with smm for the benefit of
inconsistently configured systems without breaking the behavior on
Debian.  According to this proposal, [5] is not a bug.

Reuben made a quick survey of the terminals that would have to be
patched (see [1]), and the terminals he said would need to be changed
are listed in X-Debbugs-Cc.

Thoughts?  Improvements?  Proposed wording?

Jonathan
sending this at Reuben's request.  I don't have a horse in this race
--- I use AltGr for those hard-to-type characters and have never found
much use for Meta+foo keybindings.  Comments and other help from
people affected would of course be welcome.

[1] http://bugs.debian.org/326200

[2] From xterm's control sequence reference:
    Many keyboards have keys labeled "Alt". Few have keys labeled
    "Meta". However, xterm’s default translations use the Meta
    modifier. Common keyboard configurations assign the Meta modifier
    to an "Alt" key.

[3] 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
	eightBitInput resource. The default is "false."

[4] From http://bugs.debian.org/534192:
    xterm does in fact toggle the eightBitInput resource setting when
    the terminfo smm/rmm capabilities are sent.

[5] http://bugs.debian.org/574396




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#651035; Package debian-policy. (Mon, 05 Dec 2011 09:09:11 GMT) Full text and rfc822 format available.

Acknowledgement sent to Russ Allbery <rra@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Mon, 05 Dec 2011 09:09:21 GMT) Full text and rfc822 format available.

Message #10 received at 651035@bugs.debian.org (full text, mbox):

From: Russ Allbery <rra@debian.org>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: 651035@bugs.debian.org
Subject: Re: Bug#651035: please decide how terminals should report Alt+letter combinations
Date: Mon, 05 Dec 2011 01:03:44 -0800
My initial reaction is that I want to see a more compelling justification
for standardizing anything here.  We've gone years with this behavior
without standardizing anything.  Are there multiple other bug reports from
users for which this is confusing?  Is it worth the effort for all
maintainers of X terminal emulators in Debian to track this issue and make
changes to defaults to standardize (possibly diverting from upstream
default behavior)?

If this is just a differentiating default between xterm and other X
terminal emulators, well, there are a lot of those, which is why I still
use xterm rather than the other ones (since for the most part I personally
find the changes annoying rather than useful).  In other words, if this is
just one of those nvi vs. vim things, I don't think we should be taking
sides.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#651035; Package debian-policy. (Mon, 05 Dec 2011 09:27:26 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Mon, 05 Dec 2011 09:27:31 GMT) Full text and rfc822 format available.

Message #15 received at 651035@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: 651035@bugs.debian.org
Subject: Re: please decide how terminals should report Alt+letter combinations
Date: Mon, 5 Dec 2011 03:24:25 -0600
Russ Allbery wrote:

> My initial reaction is that I want to see a more compelling justification
> for standardizing anything here.

I don't think it's any more or less confusing than delete-versus-
backspace behavior.  For an example of what went wrong in the past
that prompted me to suggest adding some documentation to prevent it
happening again, see [1].

To be explicit, the goals in user-visible behavior are:

 1. Applications should all behave the same way wrt handling of the
    Meta key in terminals.  Advertising the smm capability makes that
    basically impossible.

 2. It should be possible to type Meta+letter keys in the default
    configuration.

The second goal seems less important to me than the first.  Maybe this
proposal should be narrowed to just focus on (1).  Both seem useful,
though.

Thanks for the quick feedback.

Ciao,
Jonathan

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=69;bug=574396




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#651035; Package debian-policy. (Mon, 05 Dec 2011 09:39:15 GMT) Full text and rfc822 format available.

Acknowledgement sent to Russ Allbery <rra@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Mon, 05 Dec 2011 09:39:18 GMT) Full text and rfc822 format available.

Message #20 received at 651035@bugs.debian.org (full text, mbox):

From: Russ Allbery <rra@debian.org>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: 651035@bugs.debian.org
Subject: Re: Bug#651035: please decide how terminals should report Alt+letter combinations
Date: Mon, 05 Dec 2011 01:36:34 -0800
Jonathan Nieder <jrnieder@gmail.com> writes:
> Russ Allbery wrote:

>> My initial reaction is that I want to see a more compelling justification
>> for standardizing anything here.

> I don't think it's any more or less confusing than delete-versus-
> backspace behavior.

I do, for the simple reason that everyone uses the delete key, but a lot
of people (including a lot of Emacs users) never use the Alt key at all.

>  1. Applications should all behave the same way wrt handling of the
>     Meta key in terminals.  Advertising the smm capability makes that
>     basically impossible.

Basically, I'm dubious the gain from this is worth the effort.  Presumably
Thomas has some reason for making xterm's default what it is currently, if
only "it's always been that way."  My guess is that most people who are
explicitly using xterm (which usually requires some effort these days,
since the desktop environments all default to something else) are pretty
big on "it's always been that way" behavior.  :)  (That's what I meant by
the comparison with nvi users.)

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#651035; Package debian-policy. (Mon, 05 Dec 2011 09:45:12 GMT) Full text and rfc822 format available.

Acknowledgement sent to Russ Allbery <rra@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Mon, 05 Dec 2011 09:45:12 GMT) Full text and rfc822 format available.

Message #25 received at 651035@bugs.debian.org (full text, mbox):

From: Russ Allbery <rra@debian.org>
To: 651035@bugs.debian.org
Cc: Jonathan Nieder <jrnieder@gmail.com>
Subject: Re: Bug#651035: please decide how terminals should report Alt+letter combinations
Date: Mon, 05 Dec 2011 01:43:33 -0800
Russ Allbery <rra@debian.org> writes:
> Jonathan Nieder <jrnieder@gmail.com> writes:
>> Russ Allbery wrote:

>>> My initial reaction is that I want to see a more compelling justification
>>> for standardizing anything here.

>> I don't think it's any more or less confusing than delete-versus-
>> backspace behavior.

> I do, for the simple reason that everyone uses the delete key, but a lot
> of people (including a lot of Emacs users) never use the Alt key at all.

Sorry, I meant backspace here.  Not everyone uses Delete (I don't, for
example).  But even there, I think more people use both than use the Alt
key in a terminal.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#651035; Package debian-policy. (Mon, 05 Dec 2011 09:51:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Mon, 05 Dec 2011 09:51:10 GMT) Full text and rfc822 format available.

Message #30 received at 651035@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: 651035@bugs.debian.org
Subject: Re: please decide how terminals should report Alt+letter combinations
Date: Mon, 5 Dec 2011 03:49:20 -0600
Russ Allbery wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:

>>  1. Applications should all behave the same way wrt handling of the
>>     Meta key in terminals.  Advertising the smm capability makes that
>>     basically impossible.
>
> Basically, I'm dubious the gain from this is worth the effort.  Presumably
> Thomas has some reason for making xterm's default what it is currently, if
> only "it's always been that way."

The xterm terminfo entry does not currently advertise the smm
capability, if I am reading "infocmp xterm" output correctly.

> My guess is that most people who are
> explicitly using xterm (which usually requires some effort these days,
> since the desktop environments all default to something else) are pretty
> big on "it's always been that way" behavior.  :)

I see.  (I only know myself --- I use xterm because it is fast.) :)




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#651035; Package debian-policy. (Mon, 05 Dec 2011 10:03:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Russ Allbery <rra@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Mon, 05 Dec 2011 10:03:08 GMT) Full text and rfc822 format available.

Message #35 received at 651035@bugs.debian.org (full text, mbox):

From: Russ Allbery <rra@debian.org>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: 651035@bugs.debian.org
Subject: Re: Bug#651035: please decide how terminals should report Alt+letter combinations
Date: Mon, 05 Dec 2011 02:00:20 -0800
Jonathan Nieder <jrnieder@gmail.com> writes:
> Russ Allbery wrote:

>> Basically, I'm dubious the gain from this is worth the effort.  Presumably
>> Thomas has some reason for making xterm's default what it is currently, if
>> only "it's always been that way."

> The xterm terminfo entry does not currently advertise the smm
> capability, if I am reading "infocmp xterm" output correctly.

Note that I'm not arguing against changing things in xterm, particularly
in conjunction with upstream.  Just that I'm not sure it's worth writing a
policy about this, rather than making decisions specifically about the
xterm package to make it work better, better serve its users, etc.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#651035; Package debian-policy. (Mon, 05 Dec 2011 10:12:12 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Mon, 05 Dec 2011 10:12:14 GMT) Full text and rfc822 format available.

Message #40 received at 651035@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: 651035@bugs.debian.org
Subject: Re: please decide how terminals should report Alt+letter combinations
Date: Mon, 5 Dec 2011 04:10:40 -0600
Russ Allbery wrote:

> Note that I'm not arguing against changing things in xterm, particularly
> in conjunction with upstream.  Just that I'm not sure it's worth writing a
> policy about this, rather than making decisions specifically about the
> xterm package to make it work better, better serve its users, etc.

I guess I wasn't clear.  The proposal had two parts:

 1) standardizing on a default sequence to send for Alt+letter combinations
 2) documenting in policy that advertising the smm capability is a Bad Idea.

The first part seems to be what you have been responding to, and I've
already said it's not a big deal to me.  The second part seems more
important, and it doesn't involve changing xterm at all.

Thanks for your thoughtfulness, and hoping that clarifies a little.
Jonathan




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#651035; Package debian-policy. (Mon, 05 Dec 2011 10:22:44 GMT) Full text and rfc822 format available.

Acknowledgement sent to Russ Allbery <rra@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Mon, 05 Dec 2011 10:22:54 GMT) Full text and rfc822 format available.

Message #45 received at 651035@bugs.debian.org (full text, mbox):

From: Russ Allbery <rra@debian.org>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: 651035@bugs.debian.org
Subject: Re: Bug#651035: please decide how terminals should report Alt+letter combinations
Date: Mon, 05 Dec 2011 02:18:53 -0800
Jonathan Nieder <jrnieder@gmail.com> writes:

> I guess I wasn't clear.  The proposal had two parts:

>  1) standardizing on a default sequence to send for Alt+letter combinations
>  2) documenting in policy that advertising the smm capability is a Bad Idea.

> The first part seems to be what you have been responding to, and I've
> already said it's not a big deal to me.  The second part seems more
> important, and it doesn't involve changing xterm at all.

I have been mostly commenting on the first, but the second seems to have
the same issue to me.  It's not clear to me that it's important for Policy
to say something here.

It sounds to me from your analysis like the primary problem with the
smm/rmm sequences is that one is overriding possibly user-configured
behavior without knowing what the user was really expecting or intending.
But that sounds like a reason for applications to not use the
functionality, not for terminals to stop advertising it if they do indeed
respond correctly to those sequences.  And I'm worried about getting into
saying "this part of terminfo is weirdly buggy and probably not a good
idea to use" in Policy, since we could make statements like that about a
*lot* of things.

I do see why you're raising it as a Policy issue, since it's an
interoperability challenge between different parts of the Debian system.
But it seems rather esoteric to me, and I'm not sure asking maintainers to
worry about it is worth it.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>




Reply sent to Jonathan Nieder <jrnieder@gmail.com>:
You have taken responsibility. (Mon, 05 Dec 2011 10:36:35 GMT) Full text and rfc822 format available.

Notification sent to Jonathan Nieder <jrnieder@gmail.com>:
Bug acknowledged by developer. (Mon, 05 Dec 2011 10:36:38 GMT) Full text and rfc822 format available.

Message #50 received at 651035-done@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: 651035-done@bugs.debian.org
Subject: Re: please decide how terminals should report Alt+letter combinations
Date: Mon, 5 Dec 2011 04:32:54 -0600
Russ Allbery wrote:

> It sounds to me from your analysis like the primary problem with the
> smm/rmm sequences is that one is overriding possibly user-configured
> behavior without knowing what the user was really expecting or intending.
> But that sounds like a reason for applications to not use the
> functionality, not for terminals to stop advertising it if they do indeed
> respond correctly to those sequences.

Ah, ok.  Seems sensible enough.  I'll talk to Chet about this.




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#651035; Package debian-policy. (Mon, 05 Dec 2011 22:33:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to dickey@his.com:
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Mon, 05 Dec 2011 22:33:07 GMT) Full text and rfc822 format available.

Message #55 received at 651035@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@his.com>
To: 651035@bugs.debian.org
Cc: 651035-submitter@bugs.debian.org
Subject: re: #651035 please decide how terminals should report Alt+letter combinations
Date: Mon, 05 Dec 2011 17:28:02 -0500
[Message part 1 (text/plain, inline)]
>The xterm terminfo entry does not currently advertise the smm
>capability, if I am reading "infocmp xterm" output correctly.

That's referring to the Debian packages for ncurses and xterm.

xterm (upstream) has had smm/rmm in the terminfo description
since patch #216 (2006/8/1).

I've made occasional comments regarding smm/rmm to the ncurses
packagers, noting an issue with bash (which has been modified
to address this).  See

http://invisible-island.net/xterm/xterm.faq.html#bash_meta_mode

As a rule, I add all of the features that xterm _can_ do to the terminal
description.  smm/rmm was added relatively late (only 5 years ago) because it
didn't occur to me til I'd added the escape sequence to implement it.

For what it's worth, the terminals that have been mentioned so far generally
don't implement the meta mode described in the terminfo manpage (one or another
of lacking the ability to change the mode, or consisting only of the choice
between prefixing some codes with an escape character or not).

If my attention's focused on that, I might make a table showing why they are or
are not marked with smm.

From terminfo(5):
       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.

-- 
Thomas E. Dickey <dickey@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net
[signature.asc (application/pgp-signature, inline)]

Message sent on to Jonathan Nieder <jrnieder@gmail.com>:
Bug#651035. (Mon, 05 Dec 2011 22:33:10 GMT) Full text and rfc822 format available.

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 03 Jan 2012 07:34:14 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 19:38:09 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.