delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/04/10/17:09:47

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=0.8 required=5.0 tests=BAYES_40,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SARE_MSGID_LONG45,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <20100410181700.GA7321@ednor.casa.cgf.cx>
References: <u2v49e721a81004081305q61e00044hba10b82e6900aa3d AT mail DOT gmail DOT com> <q2q49e721a81004081307q2db70190p176cd745b2a78388 AT mail DOT gmail DOT com> <m2n416096c61004100231je0fea482s7a9a7d2e82cd2792 AT mail DOT gmail DOT com> <20100410140811 DOT GA8593 AT ednor DOT casa DOT cgf DOT cx> <p2k416096c61004100900j2d3b3567gdd068feb17547ec3 AT mail DOT gmail DOT com> <20100410161626 DOT GA1904 AT ednor DOT casa DOT cgf DOT cx> <20100410173607 DOT GA3986 AT ednor DOT casa DOT cgf DOT cx> <20100410181700 DOT GA7321 AT ednor DOT casa DOT cgf DOT cx>
Date: Sat, 10 Apr 2010 22:09:32 +0100
Message-ID: <i2t416096c61004101409ka5c18517obfc3a09e284a0e98@mail.gmail.com>
Subject: Re: 1.7.3: Backspace key not working in GNU screen.
From: Andy Koppe <andy DOT koppe AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Christopher Faylor wrote:
> I'm not 100% sure that this is the right fix but the new snapshot at
> least works around the problem.

Thanks.

> The problem is that screen explicitly sets VERASE to 0. =C2=A0I believe t=
hat
> it does that to mean "there is really no erase character since I'm
> handling that".

You're right. Zero is the value of the _POSIX_VDISABLE constant for
disabling special characters. Therefore, using c_cc[VERASE] as the
backspace keycode was a bad idea all along. Sorry for suggesting it in
the first place.

> That should not cause Cygwin to send a null character.
> I think it should probably just send the default \177 character.

Makes sense given the botched design, but of course it does mean that
the user's backspace keycode setting is ignored. Also, 'screen' would
be expecting what was set in c_cc[VERASE] as the backspace keycode.

I can think of two ways to fix the design. One would be to introduce a
CYGWIN flag for switching from the default ^? to ^H, named something
like 'backspace_sends_bs', 'legacy_bs' or 'bs_is_ctrl_h'. Another
would be to implement the DECBKM ("DEC Backarrow Key Mode") control
sequence for the purpose, which is also supported by xterm and mintty:

\e[?67h  Backspace key sends ^H
\e[?67l  Backspace key sends ^?

Andy

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019