nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] more on Home/End not working at statusbarw/ALT_KEYPA


From: David Lawrence Ramsey
Subject: Re: [Nano-devel] more on Home/End not working at statusbarw/ALT_KEYPAD on xterm
Date: Sat, 5 Jul 2003 12:29:36 -0700 (PDT)

Chris Allegretta <address@hidden> wrote:

<snip>

>I wonder if this would not allow FreeBSD users to use their backspace
>keys properly.  Currently that's one large reason to use -K, that
>keypad() seems to change the backspace key into delete.  I don't have a
>FreeBSD system to test this on anymore though...

After looking through a lot of ncurses and other documentation, it
doesn't appear so; forcing the keypad on would make Delete act like
Backspace at the statusbar prompt at all times for FreeBSD users. 
Furthermore, this Delete/Backspace problem is apparently why Pico has a
-d option.  Note the description for -d, which didn't make much sense to
me until now:

"Rebind the "delete" key so the character the cursor is on is rubbed out
rather than the character to its left."

[unspoken: "...assuming your 'delete' key is erroneously rubbing out
characters to its left."]

When I use -d with Pico 4.4, Backspace acts the same as Delete.  Lee
Nelson's hack to interpret KEY_DC as KEY_BACKSPACE from last month
appears to be the equivalent of what Pico does here.  I put that hack in
nano as a test, and when -K isn't used, Delete acts like Backspace on my
(Slackware) box, the reverse of the FreeBSD box (as expected).

So it appears that the only non-hackish solutions to this problem are to
have all FreeBSD users use -K, to implement -d (using Lee's hack when -d
is used) and have all FreeBSD users use it when not using -K, or to
implement -d and remove -K if indeed the main reason for -K's continued
existence is this Backspace/Delete problem.  The first of these appears
to be the only feasible solution for the stable branch, although the
second or third would be better solutions in the long term.  Not to
mention that there are apparent conflicts between some of the
non-keypad() escape sequences, e. g. FreeBSD's F9 and F10 and Mach's (I
couldn't find the Hurd console in the terminfo.src file, but its
sequences seemed to match those sequences marked with comments
indicating) Page Down and Page Up.

In light of this, my patch would fix the statusbar for me when using -K
but break it for FreeBSD users whether they were using -K or not, so it
shouldn't go in.  Since I can work around it for the time being by not
using -K, it's relatively minor anyway.


_____________________________________________________________
Sluggy.Net: The Sluggy Freelance Community!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]