Subject: Re: Strange-Dangerous behaviour in Cygwin [ATTN base-file maintainer]
From: [email-masked] (Eric Blake)
To: [email-masked]
Cc: David Rothenberger <[email-masked]>
Date: Tue, 10 May 2005 17:06:33 +0000

> I get ^H in a cmd window, an rxvt window, and an xterm window.
> 

Hmm, it's been more than 1.5 years since I got cygwin working how I like it, so I don't remember exactly what I did, but these lines in /etc/profile are helpful:

# Consistent BackSpace and Delete Configuration:
#   http://www.ibb.net/~anne/keyboard.html

Trying this:

$ for term in cygwin xterm rxvt ; do
> infocmp cygwin | grep kbs
> done

shows that my terminfo database still claims the backspace key is currently ^H for all three terminals, even though I seem to recall trying to change kbs=^? at one point.

Ahah - I think I found it - in my ~/.Xdefaults, I added
Rxvt*backspacekey: \177
*VT100.Translations: #override \
  <Key>BackSpace: string(0x7f)\n\
  <Key>Delete: string("\033[3~")
*ttyModes: erase ^?

At any rate, setting `stty erase '^?'' when backspace generates ^H is the wrong thing to do.  And if it is possible, it would be much nicer if cygwin could distinguish between [ctrl-h] and [backspace], so that the two keys can be distinguished (it is nice to have [ctrl-h] be help, and [backspace] be a deletion command, in terminal-based emacs).  And it would be really nice if the terminfo and termcap databases accurately reflected the true nature of the cygwin terminal, as to which sequences are needed to affect the screen and which sequences should pass through to the application.

--
Eric Blake

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