[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: rxvt backspace still broken



John Goerzen <jgoerzen@complete.org> writes:

> I have reported this as a bug before but it is still an issue.
> 
> This perhaps is something that the developers need to decide on.
> 
> rxvt still doesn't work with, for example, ncftp.  The backspace key
> does not perform the desired action (c-H does, though).
> 
> With xterm, I have never had any problem with the backspace and it
> continues to work fine.
> 
> However, rxvt does not work so well.  It seems that some curses/ncurses
> programs do not correctly interpret the backspace sequence that rxvt
> is sending.
> 
> The latest communication from rxvt's maintainer stated that rxvt is
> now set to use whatever stty erase is set to in the CALLING
> environment -- NOT what the rxvt terminfo/termcap is set to.  Since
> the calling environment will often set erase to ^? (when rxvt is
> started from a menu or button bar) but both xterm and rxvt terminfo
> entries define it as ^H, this could definitely be a problem (and is).

This is true.  The correct solution is to provide a new rxvt terminfo
entry with kbs (the BackSpace key capability) set to ^?.

> I believe that xterm/rxvt should call stty (or whatever) such that the 
> environment they start up is set to use the same as is defined in the
> term{cap,info} database.

Yes.  This is exactly what the newly proposed BackSpace/Delete policy
change tries to do.  Basically, both xterm and rxvt should use ^? for
BackSpace and require that stty erase and the terminfo entries use ^?.
Rxvt will have the additional advantage that if invoked when stty erase
is ^H (something that should not happen in normal use since Debian's
policy will dictate that everything uses ^? for erase by default), it
will use ^H for BackSpace to remain consistent with the terminal's
line settings.

> Or -- why does xterm always seem to work but rxvt seems to be broken?
> It has had various problems with backspace for a long time.

This is because xterm always uses ^H for BackSpace and is therefore
consistent.  Of course, using emacs in an xterm becomes a pain, since
emacs assumes that ^H is the help key.


"Marcelo E. Magallon" <mmagallo@efis.ucr.ac.cr> writes:
> 
>> I have reported this as a bug before but it is still an issue.
> 
> Yeap. It is... in fact I'm wondering why I'm still using rxvt at
> all. Last night I was so pissed off about this and another issue,
> I logged off and went to sleep. I hope I have a clearer mind now... I
> don't intend to rant over this, it's just annoying and annoyed users
> are bad publicity.
> 
>> This perhaps is something that the developers need to decide on.

This is the purpose of the new BackSpace/Delete proposal: a consistent
interface for all terminals and applications.  Rxvt already behaves
according to this new proposed policy change.

>> Rxvt still doesn't work with, for example, ncftp.  The backspace key
>> does not perform the desired action (c-H does, though).

This is because rxvt's terminfo entry is incorrect.  I have the new,
correct entry, which I've sent to the ncurses maintainer and included
in this posting.

> I fully understand all the arguments for the key labeled BackSpace doing
> Delete, and BS doing C-h or whatever. I don't care what the default is. 
> 
> The only thing I'd praying for is to be able to set the behavior in one
> place, and that's it. I know the Keyboard people are working on this, but
> in the meantime it's frustrating. 
> 
> A bigger issue for me (and any rxvt user that has to type anything not
> English): why doesn't Meta8 work? I have RAlt = Multikey. This worked
> with previous rxvt's. The new release from hamm silently ignores it. I
> read the man page, yet another time, and it mentions that Meta8 is
> False by default. I set Rxvt.Meta8 (and all the possible variations,
> rxvt.Meta8, rxvt*Meta8, Xterm.Meta8 ...) to True, xrdb says it's so,
> but rxvt just ignores Multikey.

This is an actual bug.  When compiling version 2.4.5-1, I forgot to
disable rxvt's own mechanism for handling resource settings.  Instead of
using the server's resource database, rxvt scans the .Xresources file.
Therefore, settings included in this file should work, but settings
entered manually using xrdb will be overlooked.  This will be fixed in
the next version of rxvt.


Hugo Haas <hh223@hermes.cam.ac.uk> writes:
> 
> I had lots of problems with the backspace key with rxvt. The problem is
> that erase is bound default to ^? (actually rxvt inherits this value,
> which is ^? by default) and then, with programs like pico, the backspace
> key behave as delete.
> 
> I talked to Oezguer Kesim about this, and we finally agreed that a
> reasonable solution is to force erase to be ^H, by compiling rxvt with
> #FORCE_BACKSPACE.
> 
> Here is what he said:
> 
>>> Do you see any reason for which #FORCE_BACKSPACE should not be
>>> defined? If the answer is no, don't you think that it would be a good
>>> idea to enable it by default?
>> 
>> Because on some other platforms (such as SunOS) ^? is the default
>> and/or the stty settings are always correct, so you don't _need_ to
>> force anything -- if you define #FORCE_BACKSPACE you won't ever get ^?
>> anymore, even if you want.  But that's ok, since you usually don't
>> need it.  BTW, xterm hardlinks erase to ^H, too.
>> 
>>> If it is a good idea, I am planning to ask the Debian maintainer to
>>> recompile his package. But I am not sure that with this feature,
>>> all the other programs will work... :-/
>> 
>> It is a good idea and all the other programs should work, as long as
>> your stty settings are correct.
> 
> Don't you think it would be a good idea to compile the Debian version of
> rxvt with this feature enabled?

Consistency is your objective, and yes, forcing rxvt to use ^H will
achieve this.  However, using ^? for BackSpace (with a correct terminfo
entry that reflects this) will also provide consistency and will comply
with the new proposed policy change.

CONCLUSION:

I shall not change rxvt's behavior, since it complies with the new
proposed policy.  For those users who want rxvt to work now, that is,
before the next ncurses-base package is released, I've included the
correct rxvt terminfo entry in this message.  To use this, place the
file (called rxvt.terminfo) in the current working directory, ensure
that the TERMINFO environment variable is not set, and execute as root

	tic rxvt.terminfo

Brian

# From: Thomas Dickey <dickey@clark.net> 04 Oct 1997
# Updated: Özgür Kesim <kesim@math.fu-berlin.de> 02 Nov 1997
# Notes:
# rxvt 2.21b uses
#       smacs=\E(B\E)U^N, rmacs=\E(B\E)0^O,
# but some applications don't work with that.
# It also has an AIX extension
#       box2=lqkxjmwuvtn,
# and
#       ech=\E[%p1%dX,
# but the latter does not work correctly.
#
# rxvt is normally configured to look for "xterm" or "xterm-color" as $TERM.
# Since rxvt is not really compatible with xterm, it should be configured as
# "rxvt-basic" (monochrom) and "rxvt"
#
# Debian's changes:
#   Debian has uses two termcap/terminfo entries:
#	rxvt	for color displays
#	rxvt-m	for monochrome displays
#   Debian also prefers ^? for kbs (backspace).
rxvt-m|monochrome rxvt terminal emulator (X Window System), 
        am, bce, eo, km, mir, msgr, xenl, xon, 
        cols#80, it#8, lines#24, 
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, 
        bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l, 
        clear=\E[H\E[2J, cnorm=\E[?25h, cr=^M, 
        csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, 
        cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C, 
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, 
        cvvis=\E[?25h, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, 
        dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E(B\E)0, 
        flash=\E[?5h\E[?5l, home=\E[H, hpa=\E[%i%p1%dG, ht=^I, 
        hts=\EH, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, 
        ind=^J, is1=\E[?47l\E=\E[?1l, 
        is2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l, 
        kDC=\E[3$, kEND=\E[8$, kHOM=\E[7$, kLFT=\E[d, kNXT=\E[6$, 
        kPRV=\E[5$, kRIT=\E[c, ka1=\EOw, ka3=\EOy, kb2=\EOu, kbs=^?, 
        kc1=\EOq, kc3=\EOs, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B, 
        kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kel=\E[8\^, 
        kend=\E[8~, kent=\EOM, kf0=\E[21~, kf1=\E[11~, kf10=\E[21~, 
        kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, 
        kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, 
        kf19=\E[33~, kf2=\E[12~, kf20=\E[34~, kf3=\E[13~, 
        kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, 
        kf9=\E[20~, kfnd=\E[1~, khome=\E[7~, kich1=\E[2~, 
        kmous=\E[M, knp=\E[6~, kpp=\E[5~, kslt=\E[4~, rc=\E8, 
        rev=\E[7m, ri=\EM, rmacs=^O, rmcup=\E[?47l\E8, rmir=\E[4l, 
        rmkx=\E>, rmso=\E[27m, rmul=\E[24m, 
        rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H, 
        rs2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l\E>, 
        s0ds=\E(B, s1ds=\E(0, sc=\E7, smacs=^N, smcup=\E7\E[?47h, 
        smir=\E[4h, smkx=\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, 
        vpa=\E[%i%p1%dd, 
rxvt|rxvt terminal emulator (X Window System), 
        colors#8, pairs#64, 
        op=\E[39;49m, setab=\E[%p1%{40}%+%dm, 
        sgr0=\E[m\017, setaf=\E[%p1%{30}%+%dm,
        use=rxvt-m, 

Reply to: