This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Suggestion for terminal package maintainers


On Jun  2 17:47, Corinna Vinschen wrote:
> On Jun  2 11:39, Christopher Faylor wrote:
> > On Tue, Jun 02, 2009 at 05:33:27PM +0200, Corinna Vinschen wrote:
> > >Maybe it is, that's why I'm asking.  But, if we do that, shouldn't
> > >Ctrl-Backspace return ^H as in xterm?  So far the Cygwin console
> > >returned ^H without and ^? with Ctrl, now it returns ^? in both
> > >variations.
> > 
> > IMO, cygwin's console == linux console.  On two of my systems (Fedora
> > and Gentoo) CTRL-Backspace returns Backspace on the console.  Now that
> > I'm at work, I see that CTRL-Backspace returns ^H on my Ubuntu system.
> > But, so far, the CTRL-Backspace == Backspace contingent is winning.
> 
> Uh, oh, hmm.  I was always under the impression we try to be as xterm
> compatible as possible, rather than the Linux console.

I found a problem with this change.  Tcsh's default keybinding for
^? is backward-delete-word, while ^H is bound to backward-delete-char.
So far it was possible to use Alt-Backspace to delete a word.  This
doesn't work anymore since ^? is now mapped to backward-delete-char
due to the tty erase being set to ^?, and Alt-Backspace only returning
a NUL byte.

Using Alt-Backspace to delete a word works fine in the Linux console.
This means, the keymapping for Alt-Backspace does not return ^? but one
of the other character sequences bound to backward-delete-word:

  tcsh$ bindkey | grep backward-delete-word
  "^W"           ->  backward-delete-word
  "\210"         ->  backward-delete-word
  "\377"         ->  backward-delete-word
  "^[^H"         -> backward-delete-word
  "^[^?"         -> backward-delete-word

The problem is, for some reason the sequence generated by Alt-Backspace
is not visible in od output.  Neither for the Linux console, nor in
xterm.  Does anybody know the sequence?  I failed to figure that out via
google.

Even not knowing the sequence returned by Alt-Backspace, AFAICS, the
right thing to do is to send either ^[^? or \377, dependent on the
setting of dev_state->metabit.  That's how the META key is usually
defined and it brings back the old Alt-Backspace functionality to tcsh.

I checked my change in for now.  If somebody thinks it's wrong and has
another solution, just speak up.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]