delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/12/04/15:16:08

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <b33adb140812041215gc66783ej9bd8cd9022e3be37@mail.gmail.com>
Date: Thu, 4 Dec 2008 15:15:19 -0500
From: "Jonathon Merz" <jonathon DOT merz AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Trouble differentiating Backspace from Control-Backspace in rxvt-20050409-9
In-Reply-To: <49380CAE.9E808DD0@dessent.net>
MIME-Version: 1.0
References: <b33adb140812040757k30c772b4w5b776f98255b9dae AT mail DOT gmail DOT com> <49380CAE DOT 9E808DD0 AT dessent DOT net>
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

On Thu, Dec 4, 2008 at 12:00 PM, Brian Dessent <brian AT dessent DOT net> wrote:
> Jonathon Merz wrote:
>
>> I recently upgraded from rxvt-20050409-7 to rxvt-20050409-9 and have
>> stopped getting different output for Backspace and Control-Backspace.
>> In rxvt-20050409-7, I get ^? for Backspace and ^H for
>> Control-Backspace.  In rxvt-20050409-9, I get ^H for both.
>>
>> I've tried explicitly setting the rxvt backspacekey to ^?, but then I
>> get ^? both with and without the Control key.
>
> I guess the first question is are you using rxvt in native (GDI/W11) or
> X11 mode.  I can't see that much has changed in the patches other than
> tweaks to use the new modular X11 server.  So if you are using GDI mode,
> then I'm at a loss to explain the differences, however if you are using
> X11 mode then it's highly likely that the difference in behavior is due
> to the many changes in the new X server and not anything in rxvt.  You
> should follow up on the cygwin-xfree@ list if that is the case.

Oops, I forgot to make that distinction.  I am running rxvt in native
mode without X.

>> I've also been trying to decipher some of the documentation for
>> terminfo/termcap, though I'm having trouble wrapping my mind around
>> those, and I'm not certain whether that is the path I should go down
>> since my terminfo appears to be unchanged between the two.  For what
>> it's worth, I tried running infocmp on both the -7 and -9 versions and
>> got identical output for them both.
>
> I think terminfo/termcap are irrelevant here as their purpose is to
> describe behavior, not to change it.  They might document for example
> that terminal FOO generates the byte sequence BAR when the user presses
> key X so that programs can know that when TERM=FOO and the sequence BAR
> appears in the input stream that the user has in fact pressed X.  But
> they can't alter the terminal's behavior to make it generate a different
> sequence.

Thanks for clearing me up on that - I suspect I would have spent a lot
of time with little benefit.

After further fiddling, I've at least figured out what's going on, but
I'm still not sure why.  It appears that the change between
rxvt-20050409-7 and rxvt-20050409-9 that has made the difference is in
the patch for src/rxvt/src/feature.h changing:
   # define X11USRLIBDIR		"/usr/lib"
to:
   # define X11USRLIBDIR		"/etc"

The new definition causes rxvt to be able to find the Rxvt default
resources file (a good thing! :) which in both -7 and -9 is found at
/etc/X11/app-defaults/Rxvt.  In -7, it appears that rxvt was looking
for that file at /usr/lib/X11/app-defaults/Rxvt, where it did not
exist.

That's the part I understand.  The part that I don't understand is
that the problem appears to be the line:
   Rxvt.backspacekey:      ^H
in /etc/X11/app-defaults/Rxvt.

It appears that the Rxvt.backspacekey resource sets the value for both
<Backspace> and <Control-Backspace>.  If I comment that line out, rxvt
works as I wish it to (i.e. <Backspace> gives ^? and
<Control-Backspace> gives ^H).  If I leave that line in, rxvt gives ^H
for both, and if I either change it to ^? or set that resource to ^?
in my ~/.Xdefaults, I always get ^? both with and without the Control
key.

My new questions then, are: Is this correct/expected behavior?  and Is
there any way I can "unset" in my ~/.Xdefaults or somewhere like that
a resource that is set in a system resource file so that I can avoid
modifying the system-wide one?

Thanks again,

-Jon

--
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/

- Raw text -


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