ui/ncurses/menu: Allow space to select menu items
authorJeremy Kerr <jk@ozlabs.org>
Fri, 8 Nov 2013 02:03:30 +0000 (10:03 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Thu, 14 Nov 2013 04:33:01 +0000 (15:33 +1100)
To keep consistent with buttons, which also accept space.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
ui/ncurses/nc-menu.c

index 5dc6469df1b55f9110cf0e2eefa0a6857de9fb5a..eb7cfdff0d942562333a664dfe145b4555e03e6b 100644 (file)
@@ -238,6 +238,7 @@ static void pmenu_process_key(struct nc_scr *scr, int key)
                if (menu->on_new)
                        menu->on_new(menu);
                break;
+       case ' ':
        case '\n':
        case '\r':
                if (item->on_execute)