From bf8d7e61a8fbc19be5ea1a73b9eaa30e58453d1f Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Fri, 11 Oct 2013 15:16:39 +0800 Subject: ui/ncurses: Use 'x' as exit key Because terminals will send escape-sequences starting with escape, ncurses will pause after receiving a signle escape, to detect these sequences. This introduces a 1-second delay when exiting the petitboot UI. Instead, use 'x'. Signed-off-by: Jeremy Kerr --- ui/ncurses/nc-menu.c | 1 + 1 file changed, 1 insertion(+) (limited to 'ui/ncurses/nc-menu.c') diff --git a/ui/ncurses/nc-menu.c b/ui/ncurses/nc-menu.c index b45719d..beb63f3 100644 --- a/ui/ncurses/nc-menu.c +++ b/ui/ncurses/nc-menu.c @@ -205,6 +205,7 @@ static void pmenu_process_key(struct nc_scr *scr, int key) switch (key) { case 27: /* ESC */ + case 'x': if (menu->on_exit) menu->on_exit(menu); nc_flush_keys(); -- cgit v1.2.1