From nobody@FreeBSD.org  Thu Nov 11 20:45:11 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B48BD106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 11 Nov 2010 20:45:11 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id A44D88FC13
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 11 Nov 2010 20:45:11 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id oABKjBIN026385
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 11 Nov 2010 20:45:11 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id oABKjBKg026384;
	Thu, 11 Nov 2010 20:45:11 GMT
	(envelope-from nobody)
Message-Id: <201011112045.oABKjBKg026384@www.freebsd.org>
Date: Thu, 11 Nov 2010 20:45:11 GMT
From: crocket <crockabiscuit@yahoo.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Virtual consoles ignore kb and kD termcap entries.
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         152146
>Category:       kern
>Synopsis:       [syscons] Virtual consoles ignore kb and kD termcap entries.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jilles
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 11 20:50:07 UTC 2010
>Closed-Date:    Sun Nov 21 16:48:28 UTC 2010
>Last-Modified:  Sun Nov 21 16:48:28 UTC 2010
>Originator:     crocket
>Release:        8.1-RELEASE
>Organization:
>Environment:
FreeBSD elisa.muffinplace.com 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:36:49 UTC 2010     root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
In cons25 termcap entry, kb=^H and kD=^?.
So I made cons25d entry and kb=\177 and kD=\E[3~ in cons25 in it.
cons25d entry inherits cons25 and overrides kb and kD.
After adding cons25d in /etc/termcap and logout and login,
the changes weren't applied.
After some inspection, I found out that csh is not aware of kb and kD.
It was obviously from the output of "telltc" builtin of csh.
I guess csh's ignorance of kb and kD caused the problem.

But xterm and genom-terminal covered for csh's ignorance of kb and kD.

Can FreeBSD virtual consoles be modified to deal with kb and kD even if a shell is not aware of it?
>How-To-Repeat:
Ctrl-v + backspace or del would print out the key symbols(^?, ^H, and etc)
>Fix:


>Release-Note:
>Audit-Trail:

From: crocket <crockabiscuit@yahoo.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: misc/152146: Virtual consoles ignore kb and kD termcap entries.
Date: Thu, 11 Nov 2010 13:35:09 -0800 (PST)

 I found out the real problem.
 csh's ignorance was not a problem.
 Even for entries recognized by csh, virtual consoles ignored those and used their own settings such as cons25.
 The kind of term I use($TERM) doesn't matter if I'm in virtual consoles.
 Virtual consoles seem to stick to cons25 or something similar no matter what $TERM is set to.
 
 
       

From: crocket <crockabiscuit@yahoo.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: misc/152146: Virtual consoles ignore kb and kD termcap entries.
Date: Thu, 11 Nov 2010 13:37:09 -0800 (PST)

 I found out the real problem.
 csh's ignorance was not a problem.
 Even for entries recognized by csh, virtual consoles ignored those and used their own settings such as cons25.
 The kind of term I use($TERM) doesn't matter if I'm in virtual consoles.
 Virtual consoles seem to stick to cons25 or something similar no matter what $TERM is set to.
 
 
       

From: crocket <crockabiscuit@yahoo.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: misc/152146: Virtual consoles ignore kb and kD termcap entries.
Date: Fri, 12 Nov 2010 00:32:20 -0800 (PST)

 I came to know that syscons keymap overrides termcap.
 Can anybody put an rc.conf setting that enables syscons to read and apply termcap?
 Or is it solved by putting "device vt" in kernel configuration?
 
 
       

From: crocket <crockabiscuit@yahoo.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: misc/152146: Virtual consoles ignore kb and kD termcap entries.
Date: Fri, 12 Nov 2010 05:22:01 -0800 (PST)

 After reading "man syscons", it is clear that syscons don't refer to termcap but to keymaps.
 If somebody modified syscons so that termcap overrode keymap settings, I'd very much appreciate it.
 
 
       

From: Jilles Tjoelker <jilles@stack.nl>
To: bug-followup@FreeBSD.org, crockabiscuit@yahoo.com
Cc:  
Subject: Re: kern/152146: [syscons] Virtual consoles ignore kb and kD termcap
 entries.
Date: Sun, 21 Nov 2010 16:54:32 +0100

 The general philosophy of termcap/terminfo is that it describes what the
 terminal does. It is used by applications to find how to interact with
 the terminal. In this model, the terminal itself does not interact with
 termcap/terminfo. However, whatever is starting the application that is
 using a terminal should try to set proper TERM and/or TERMCAP variables.
 
 In case of a serial or dialup line, the administrator or user will have
 to set a proper value in /etc/ttys. For syscons, this could be done
 better but instead the same approach is used; however, the value in the
 default /etc/ttys is usually good enough. In case of xterm, it passes
 TERM and TERMCAP variables matching its behaviour, and has lots of
 options to configure it. Most other graphical terminal emulators assume
 TERM=xterm is good enough.
 
 I think modifying syscons to use termcap/terminfo would be confusing and
 unnecessary. I think we can choose one good default Backspace/Delete way
 and keep the current options to change it.
 
 -- 
 Jilles Tjoelker
State-Changed-From-To: open->closed 
State-Changed-By: jilles 
State-Changed-When: Sun Nov 21 16:46:48 UTC 2010 
State-Changed-Why:  
I think this is the wrong direction for making <Delete> work. 
Your PR kern/152162 sounds better. 


Responsible-Changed-From-To: freebsd-bugs->jilles 
Responsible-Changed-By: jilles 
Responsible-Changed-When: Sun Nov 21 16:46:48 UTC 2010 
Responsible-Changed-Why:  
Track. 

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