From: Sam Ravnborg <sam@ravnborg.org>
To: Denis Vlasenko <vda.linux@googlemail.com>
Cc: Roman Zippel <zippel@linux-m68k.org>,
LKML <linux-kernel@vger.kernel.org>, Petr Baudis <pasky@suse.cz>
Subject: Re: [PATCH/RFC] kconfig/lxdialog: make lxdialof a built-in
Date: Sun, 30 Jul 2006 23:44:15 +0200 [thread overview]
Message-ID: <20060730214415.GB9617@mars.ravnborg.org> (raw)
In-Reply-To: <200607301442.07426.vda.linux@googlemail.com>
On Sun, Jul 30, 2006 at 02:42:07PM +0200, Denis Vlasenko wrote:
>
> I don't like "double ESC" idea at all.
>
> I am a Midnight Commander user and I use "old ESC mode"
> where single ESC works after a delay.
>
> I patched mc to look at KEYBOARD_KEY_TIMEOUT_US environment variable
> so that delay is configurable (instead of hardcoded 0.5 second one).
> Will push the patch to mc-devel.
How did you tell ncurses to change timeout value?
notimeout() and wnotimeout() did not work out when I tried it. Delay was
still ~.5 seconds.
Any help aprpeciated.
Sam
My try:
diff --git a/scripts/kconfig/lxdialog/menubox.c b/scripts/kconfig/lxdialog/menubox.c
index bf8052f..2b59657 100644
--- a/scripts/kconfig/lxdialog/menubox.c
+++ b/scripts/kconfig/lxdialog/menubox.c
@@ -198,6 +198,7 @@ int dialog_menu(const char *title, const
dialog = newwin(height, width, y, x);
keypad(dialog, TRUE);
+ wtimeout(dialog, 25);
draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
wattrset(dialog, border_attr);
@@ -221,6 +222,7 @@ int dialog_menu(const char *title, const
menu = subwin(dialog, menu_height, menu_width,
y + box_y + 1, x + box_x + 1);
keypad(menu, TRUE);
+ wtimeout(menu, 25);
/* draw a box around the menu items */
draw_box(dialog, box_y, box_x, menu_height + 2, menu_width + 2,
diff --git a/scripts/kconfig/lxdialog/util.c b/scripts/kconfig/lxdialog/util.c
index f82cebb..0973b53 100644
--- a/scripts/kconfig/lxdialog/util.c
+++ b/scripts/kconfig/lxdialog/util.c
@@ -142,7 +142,7 @@ void init_dialog(void)
keypad(stdscr, TRUE);
cbreak();
noecho();
-
+ timeout(25);
if (use_colors) /* Set up colors */
color_setup();
next prev parent reply other threads:[~2006-07-30 21:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-27 20:27 Sam Ravnborg
2006-07-28 14:09 ` Roman Zippel
2006-07-28 14:59 ` Sam Ravnborg
2006-07-30 12:42 ` Denis Vlasenko
2006-07-30 21:44 ` Sam Ravnborg [this message]
2006-07-30 22:19 ` Roman Zippel
2006-07-29 20:53 ` Sam Ravnborg
2006-07-29 20:56 ` Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060730214415.GB9617@mars.ravnborg.org \
--to=sam@ravnborg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pasky@suse.cz \
--cc=vda.linux@googlemail.com \
--cc=zippel@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®