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

Re: the home/end issue

On Tue, May 26, 1998 at 03:04:32PM +0000, 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.

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 debian-i18n-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: