Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jun 1997 19:33:14 -0700
From:      Paul Traina <pst@jnx.com>
To:        ache@freebsd.org, jkh@freebsd.org
Cc:        bugs@freebsd.org
Subject:   libdialog/libncurses/libmytinfo problem with ^J
Message-ID:  <199706190233.TAA10657@base.jnx.com>

next in thread | raw e-mail | index | archive | help
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 <enter> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706190233.TAA10657>