From owner-freebsd-bugs Wed Jun 18 19:34:28 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id TAA28410 for bugs-outgoing; Wed, 18 Jun 1997 19:34:28 -0700 (PDT) Received: from red.jnx.com (red.jnx.com [208.197.169.254]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id TAA28372; Wed, 18 Jun 1997 19:33:45 -0700 (PDT) Received: from base.jnx.com (base.jnx.com [208.197.169.238]) by red.jnx.com (8.8.5/8.8.5) with ESMTP id TAA10134; Wed, 18 Jun 1997 19:33:14 -0700 (PDT) Received: from base.jnx.com (localhost.jnx.com [127.0.0.1]) by base.jnx.com (8.8.5/8.7.3) with ESMTP id TAA10657; Wed, 18 Jun 1997 19:33:14 -0700 (PDT) Message-Id: <199706190233.TAA10657@base.jnx.com> To: ache@freebsd.org, jkh@freebsd.org cc: bugs@freebsd.org Subject: libdialog/libncurses/libmytinfo problem with ^J Date: Wed, 18 Jun 1997 19:33:14 -0700 From: Paul Traina Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Guys, I'm wondering how to best fix the following problem -- On termcap definitions where kd (key_down) is not set, libmytinfo sets keydown to ^J, which propogates through ncurses, to dialog. That means, if you hit return on a dialog box when using one of these terminal types, you get key-down behavior instead of behavior. The bug is actually in libmytinfo, and should be fixed there, but I'm worried about how badly I'm going to screw things if I change if (NOTSET(key_down)) key_down = _addstr(C_LF); to something like: if (DEF(key_down) && !strcmp(key_down, C_LF)) key_down = -1; to not only remove the default, but if keydown has been set, UNSET it if it's LF. Unfortunately, I'm worried about breaking everything else that uses libmytinfo / ncurses. Ideas? p.s. you can reproduce the problem I'm seeing by typing: TERM=ansi dialog --inputbox foo 10 10 and trying to hit return at the "OK" button.