summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2012-02-13 01:59:21 +0800
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2012-02-16 18:17:32 +0800
commit1f22d10f1570ccf83a842886ff016e9781dfed3e (patch)
tree156a19589798b76b3ceb49297074875daa59a139 /common
parentef654d161766c13e002f2bf738007ccf44d84749 (diff)
downloadbarebox-1f22d10f1570ccf83a842886ff016e9781dfed3e.tar.gz
readkey: add define for Ascii keys
this will simplify the usage of gpio keyboard Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'common')
-rw-r--r--common/menu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/menu.c b/common/menu.c
index 5291fcb..fd21e52 100644
--- a/common/menu.c
+++ b/common/menu.c
@@ -296,7 +296,7 @@ int menu_show(struct menu *m)
do {
if (m->auto_select >= 0)
- ch = '\n';
+ ch = KEY_ENTER;
else
ch = getc();
@@ -339,8 +339,8 @@ int menu_show(struct menu *m)
m->selected->action(m, m->selected);
print_menu_entry(m, m->selected, 1);
break;
- case '\n':
- case '\r':
+ case KEY_ENTER:
+ case KEY_RETURN:
clear();
gotoXY(1,1);
m->selected->action(m, m->selected);