Suggestion for terminal package maintainers
Ken Brown
kbrown@cornell.edu
Wed Jun 3 12:03:00 GMT 2009
On 6/3/2009 7:09 AM, Corinna Vinschen wrote:
> 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.
As long as you're changing the Cygwin console to be more compatible with
linux and/or xterm, let me just mention that some key combinations
involving the control key don't work in the Cygwin console the way they
do in linux and xterm. Here are two specific examples I've noticed, but
I haven't made an exhaustive search:
1. Control-<space> appears to generate <space> in the cygwin console.
2. Control-Alt-<any key> does not appear to generate anything (or maybe
it generates NUL).
Ken
More information about the Cygwin-apps
mailing list