From nobody@FreeBSD.org  Tue Mar 29 02:44:33 2011
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 AF0F81065670
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 29 Mar 2011 02:44:33 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 9FCD48FC20
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 29 Mar 2011 02:44:33 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p2T2iXRe039262
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 29 Mar 2011 02:44:33 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p2T2iX6T039261;
	Tue, 29 Mar 2011 02:44:33 GMT
	(envelope-from nobody)
Message-Id: <201103290244.p2T2iX6T039261@red.freebsd.org>
Date: Tue, 29 Mar 2011 02:44:33 GMT
From: Andrew Lankford <lankfordandrew@charter.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Arrow keys don't work with any ncurses based programs when TEKEN_XTERM enabled
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         156016
>Category:       kern
>Synopsis:       [ncurses] Arrow keys don't work with any ncurses based programs when TEKEN_XTERM enabled
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 29 02:50:16 UTC 2011
>Closed-Date:    
>Last-Modified:  Sat Apr 09 19:42:36 UTC 2011
>Originator:     Andrew Lankford
>Release:        FreeBSD 8.2-STABLE
>Organization:
>Environment:
FreeBSD bogushost3 8.2-STABLE FreeBSD 8.2-STABLE #48: Sun Mar 20 14:05:51 EDT 2011     arlankfo@bogushost3:/usr/obj/usr/src/sys/ARL8VOSTRO  i386

>Description:
I've built my kernel with the following options (shown below).  I also switched all virtual terminals in /etc/ttys from cons25 to xterm.  Seems to work fine with shells like the system bourne shell or bash-4.1.9.  The arrow keys work as expected for those programs.  However, for other bundled ncurses programs such as sysinstall, nvi, dialog, and ee, the arrow keys aren't interpreted properly.  These programs work as expected when run from a real xterm window.

options TEKEN_XTERM
options TEKEN_UTF8

# Console preferences
# Many of these ought to be boot-time tunables
options         MAXCONS=4               # number of virtual consoles
options         SC_ALT_MOUSE_IMAGE      # simplified mouse cursor in text mode
options         SC_HISTORY_SIZE=409     # number of history buffer lines
options         SC_MOUSE_CHAR=0x3       # char code for text mode mouse cursor

# The following options will let you change the default colors of syscons.
options         SC_NORM_ATTR="(FG_GREEN|BG_BLACK)"
options         SC_NORM_REV_ATTR="(FG_BLACK|BG_GREEN)"
options         SC_KERNEL_CONS_ATTR="(FG_BROWN|BG_BLACK)"
options         SC_KERNEL_CONS_REV_ATTR="(FG_BLACK|BG_BROWN)"

>How-To-Repeat:
See above.
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:
