aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhpa <hpa>2005-01-04 07:15:20 +0000
committerhpa <hpa>2005-01-04 07:15:20 +0000
commit69d80316cf6c9e5598bf8f8047f38c37abab72f2 (patch)
tree5460dd3e8160d79364a291243a3b0523a0a5cee1
parent14588ee2045fafb52f3645de8ba9264b9c8a3de8 (diff)
downloadsyslinux-elf-69d80316cf6c9e5598bf8f8047f38c37abab72f2.tar.gz
syslinux-elf-69d80316cf6c9e5598bf8f8047f38c37abab72f2.tar.xz
syslinux-elf-69d80316cf6c9e5598bf8f8047f38c37abab72f2.zip
More navigation keys
-rw-r--r--com32/libutil/get_key.c4
-rw-r--r--com32/modules/menu.c11
2 files changed, 15 insertions, 0 deletions
diff --git a/com32/libutil/get_key.c b/com32/libutil/get_key.c
index 5cc147f8..b7498a1e 100644
--- a/com32/libutil/get_key.c
+++ b/com32/libutil/get_key.c
@@ -101,12 +101,16 @@ static const struct keycode keycodes[] = {
CODE(KEY_LEFT, "\033[D"),
CODE(KEY_RIGHT,"\033[C"),
CODE(KEY_PGUP, "\033[5~"),
+ CODE(KEY_PGUP, "\033[V"),
CODE(KEY_PGDN, "\033[6~"),
+ CODE(KEY_PGDN, "\033[U"),
CODE(KEY_HOME, "\033[1~"),
CODE(KEY_HOME, "\033[H"),
CODE(KEY_END, "\033[4~"),
CODE(KEY_END, "\033[F"),
+ CODE(KEY_END, "\033OF"),
CODE(KEY_INS, "\033[2~"),
+ CODE(KEY_INS, "\033[@"),
CODE(KEY_DEL, "\033[3~"),
};
#define NCODES ((int)(sizeof keycodes/sizeof(struct keycode)))
diff --git a/com32/modules/menu.c b/com32/modules/menu.c
index e26819a8..4bd8fc56 100644
--- a/com32/modules/menu.c
+++ b/com32/modules/menu.c
@@ -361,11 +361,13 @@ const char *run_menu(void)
break;
case KEY_CTRL('P'):
case KEY_PGUP:
+ case KEY_LEFT:
entry -= MENU_ROWS;
top -= MENU_ROWS;
break;
case KEY_CTRL('N'):
case KEY_PGDN:
+ case KEY_RIGHT:
case ' ':
entry += MENU_ROWS;
top += MENU_ROWS;
@@ -378,6 +380,15 @@ const char *run_menu(void)
entry++;
top++;
break;
+ case KEY_CTRL('A'):
+ case KEY_HOME:
+ top = entry = 0;
+ break;
+ case KEY_CTRL('E'):
+ case KEY_END:
+ entry = nentries - 1;
+ top = max(0, nentries-MENU_ROWS);
+ break;
case KEY_TAB:
if ( allowedit ) {
printf("\033[?25h"); /* Show cursor */