Re: Backspace in rxvt SOLVED
Andreas Tille wrote:
>
> On Wed, 7 May 1997, Karl M. Hegbloom wrote:
>
> > >>>>> "Jens" == Jens B Jorgensen <jjorgens@bdsinc.com> writes:
> >
> > Jens> If typing Backspace on the shell command line prints "^H"
> > Jens> rather than doing a backspace, type the command "stty erase
> > Jens> ^h" (make sure you type "^" and "h", not CTRL-h. Note that
> > Jens> this only changes the current shell (terminal) so you'll
> > Jens> probably want to put it in your .profile.
> >
> > I have the same problem--- in an `rxvt`, <-Backspace prints a '~', so
> > I have to use C-h to backwards-delete-char. `stty` doesn't effect it
> > at all, as far as I can tell. I think it's a bug in `rxvt`.
> No matter if I follow the hint of Jens (stty erase ^h) or not
>
> <Backspace> does the job I expect of <Del> (delete under cursor)
> <Del> does: <Beep>~
>
> It is really a bug of rxvt? (As I mentioned xterm works OK)
>
A little digging around shows that setting the proper resources for
rxvt should fix this. Here's an excerpt from the man page Resources
section:
keysym.sym: string
Associate string with keysym sym (0xFF00 - 0xFFFF).
It may contain escape values (\b: backspace, \e,
\E: escape, \n: newline, \r: return, \t: tab, \000:
octal number) and may enclosed with double quotes
so that it can start or end with whitespace. The
intervening resource name keysym. cannot be omit
ted. This resource is only available when compiled
with FAKE_RESOURCES.
So, putting the following line in ~/.Xresources should do it
(assuming /etc/X11/config has the line 'allow-user-resources'):
Rxvt.keysym.Delete: \b
I did this and what do you know, it didn't work. I will say that
after using xterm exclusively for so long, I was please to see that
*colors* worked Out Of The Box with rxvt (cool!). I can only assume
from this exercise that the maintainer of rxvt didn't compile the
package with FAKE_RESOURCES. However, /usr/doc/rxvt/changelog.debian.gz
shows:
rxvt (2.18-5) unstable; urgency=low
* Enabled FAKE_RESOURCES and KEYSYM_RESOURCE
-- Brian Mays <brian@debian.org> Wed, 23 Oct 1996 09:50:19 -0400
So he *did* make this change. How come it doesn't seem to work then?!
Being the curious type I had to see it to believe it, so I downloaded
the source and YUP, he did make this change (sorry for doubting you
Brian). So I went into the source that actually *reads* these resources
and here's what I find (*much* to my chagrin). The "fake" xresources
reading which rxvt does can't understand symbolic keysyms (so what's
the "sym" for, huh?). It can only understand the hex-numeric value
of the keysym. The solution is to put the following line in your
.Xresources:
Rxvt.keysym.0xFFFF: \b
That's it. For the likewise curious, I found the Delete keysym's value
in the source itself for rxvt (xdefaults.c):
/*
* look for something like this (XK_Delete)
* rxvt*keysym.0xFFFF: "\177"
*/
# ifdef KEYSYM_RESOURCE
n = strlen ("keysym");
if ((str [n] == '.') && !strncmp (str, "keysym", n))
{
You can find all the numeric values of keysyms (if you have the X11
source--and this is why I object to rxvt only taking the numeric
values) in /usr/X11R6/include/X11/keysymdef.h. I hope I've redeemed
myself for my earlier misinformation. mea culpa.
--
Jens B. Jorgensen
jjorgens@bdsinc.com
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: