From timur@bat.ru  Fri Feb 27 14:53:29 2009
Return-Path: <timur@bat.ru>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3EDA91065673
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 27 Feb 2009 14:53:29 +0000 (UTC)
	(envelope-from timur@bat.ru)
Received: from mail-fx0-f158.google.com (mail-fx0-f158.google.com [209.85.220.158])
	by mx1.freebsd.org (Postfix) with ESMTP id 9D54D8FC15
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 27 Feb 2009 14:53:28 +0000 (UTC)
	(envelope-from timur@bat.ru)
Received: by fxm2 with SMTP id 2so1064549fxm.43
        for <FreeBSD-gnats-submit@freebsd.org>; Fri, 27 Feb 2009 06:53:27 -0800 (PST)
Received: by 10.86.95.8 with SMTP id s8mr4025211fgb.79.1235746407543; Fri, 27 
	Feb 2009 06:53:27 -0800 (PST)
Message-Id: <7d743c270902270653u4d4a3649k83cbb51215d241f7@mail.gmail.com>
Date: Fri, 27 Feb 2009 15:53:27 +0100
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
Sender: timur@bat.ru
To: FreeBSD-gnats-submit@freebsd.org
In-Reply-To: <20090227140025.GA12257@com.bat.ru>
Subject: Errors in the "screen" terminal description termcap
References: <20090227140025.GA12257@com.bat.ru>

>Number:         132166
>Category:       conf
>Synopsis:       Errors in the "screen" terminal description termcap
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 27 15:00:12 UTC 2009
>Closed-Date:    Mon Mar 09 06:56:59 UTC 2009
>Last-Modified:  Mon Mar 09 06:56:59 UTC 2009
>Originator:     Timur I. Bakeyev
>Release:        FreeBSD 7.1-STABLE amd64
>Organization:
Blinck Int.
>Environment:
System: FreeBSD build7.bob.blinck.net 7.1-STABLE FreeBSD 7.1-STABLE
#0: Thu Feb 5 18:43:26 UTC 2009
root@build7.bob.blinck.net:/usr/obj/usr/src/sys/BASE amd64


>Description:
In ncurses applications, namely MC with TERM=3Dscreen 'End' button
doesn't produce any effect.

>How-To-Repeat:
Compile latest MC from the ports with ncurses and run it under
'screen'. Press 'End' button - nothing happens, you can't teach MC
this button either.

>Fix:
I thought about it as some bug in ncurses, until I came across:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D92215

Date: Fri, 30 Mar 2001 16:48:13 UTC
Severity: normal
Found in versions 5.2.20010318-1, 5.2.20020112a-8

> The problem is that kll is defined to be the same value as
> kend, and (apparently) ncurses checks kll before kend...

Although, it is related to the terminfo, apparently, our termcap
was generated from the same source, as it contains:

SC|screen|VT 100/ANSI X3.64 virtual terminal:\
....
:kh=\E[1~:kI=\E[2~:kD=\E[3~:kH=\E[4~:@7=\E[4~:kP =\E[5~:\

Where:

key_ll kll kH lower-left key (home down)
key_end kend @7 end key

I'd suggest to use the same approach as Debian used, as kH seems
close to non-existing, when End key is quite frequent and useful.

With regards,
Timur.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Feb 27 17:29:25 UTC 2009 
Responsible-Changed-Why:  
Attempt to recover this PR, badly mangled by email. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=132166 
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Mon Mar 9 06:56:32 UTC 2009 
State-Changed-Why:  
Superseded by conf/132199. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=132166 
>Unformatted:
