Re: [PATCH/RFC] kconfig/lxdialog: make lxdialof a built-in

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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();
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux