summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-06-24 14:47:34 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-06-30 20:23:26 +0200
commit13b70bb921e0d3ce8986e382ad76af2e7f877fde (patch)
tree0393b8817fa0d19eb1be8b0146699a52ee5682c4 /common
parent4f02e70d6d04ee949ceee6c1aaec1a2d804fe8a1 (diff)
downloadbarebox-13b70bb921e0d3ce8986e382ad76af2e7f877fde.tar.gz
menu: implement KEY_HOME/KEY_END
To go to the first/last menu entry. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/menu.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/common/menu.c b/common/menu.c
index 0f5df2c..c50f6dd 100644
--- a/common/menu.c
+++ b/common/menu.c
@@ -393,6 +393,15 @@ int menu_show(struct menu *m)
return m->selected->num;
else
print_menu(m);
+ break;
+ case KEY_HOME:
+ m->selected = list_first_entry(&m->entries, struct menu_entry, list);
+ repaint = 1;
+ break;
+ case KEY_END:
+ m->selected = list_last_entry(&m->entries, struct menu_entry, list);
+ repaint = 1;
+ break;
default:
break;
}