the home/end issue

1998-05-26 Thread Anne Baretta
Hi,

I wonder whether it is feasible to consistently map home/end to \e[1~ and
\e[4~ in all applications? While I think this is policy-stuff, a
discussion here may be useful. 
Inputrc and cshrc can be used to map the different possible
key-sequences, but I agree with you that this is not very nice,
especially since it means that apps such as joe will have to be able to
deal with all different possibilities. It would be much easier if all
apps could rely on \e[1~ and \e[4~ to be used for home/end. I wonder, is
there any reason for using "\e[H", or
"\e[7~"?

The current home/end situation (in readline terms):

console and xterm:

"\e[1~":beginning-of-line
"\e[4~":end-of-line

--
non-conformists:

kvt:
"\e[H":beginning-of-line
"\e[F":end-of-line

rxvt:

"\e[7~":beginning-of-line
"\e[8~":end-of-line

others?

rxvt can probably be recompiled to use \e[1~ and \e[4~ (or to use
Xresources), kvt (an rxvt derivative) can too, but I don't know how
Debian deals with the kde stuff.

> You may want to bring the rxvt maintainer in ([EMAIL PROTECTED]). There are 
> other
> rxvt derivatives like eterm that may also benefit.

That's a good idea, however, what the maintainers should do about it
depends on whether it's desirable to make a policy of only using \e[1~
and \e[4~ or not. To me it seems sensible to make such a policy, if
there are problems with kvt we can at least start with rxvt, leaving 
two different entries in e.g. cshrc instead of three. It's entirely
possible that I am not aware of certain problems or issues.

Regards, Anne


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: the home/end issue

1998-05-26 Thread jdassen
On Tue, May 26, 1998 at 03:04:32PM +, Anne Baretta wrote:
> I wonder whether it is feasible to consistently map home/end to \e[1~ and
> \e[4~ in all applications? While I think this is policy-stuff, a
> discussion here may be useful. 

Maybe I'm misunderstanding this, but IMO there's a big difference between
the backspace issue (^? or ^H) and this one. A quick look in the terminfo
database (http://www.earthspace.net/~esr/terminfo/) shows there are a very
large number of different sequences associated with khome/kend
(e.g., for khome: \E[H ^^ \E[1~ \Ehm \E[Y \377\240 \E[7~ etc.).

The correct way to make applications behave consistently with home and end,
IMHO, would be something like:
Screen-oriented programs that have/support cursor movement, e.g.
editors, should use ncurses or an equivalent to parse the terminfo
entry for the current TERM setting, and use that to support the
following key behaviour, if it makes sense:
"home" (khome): Move the cursor to the start of the current line.
"end" (kend): Move the cursor to the end of the current line.
"page up" (knp): Move one page up.
"page down" (kpp): Move one page down.

> That's a good idea, however, what the maintainers should do about it
> depends on whether it's desirable to make a policy of only using \e[1~
> and \e[4~ or not.

I don't think it is, as there are _many_ different sequences associated with
home and end keys for different terminal types.

With the backspace/delete issue, a big part of the problem is that many
programs tried to fix it in their own particular way; with this issue, I
don't think many programs are hardwired to expect specific sequences for
home/end, pgup/pgdn etc.; the few that are should be changed to honour the
terminfo entry.

Ray
-- 
LEADERSHIP  A form of self-preservation exhibited by people with auto-
destructive imaginations in order to ensure that when it comes to the crunch 
it'll be someone else's bones which go crack and not their own.   
- The Hipcrime Vocab by Chad C. Mulligan


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]