elflink: Add Ctrl-p + Ctrl-n key binds
authorLiu Aleaxander <Aleaxander@gmail.com>
Tue, 15 Mar 2011 20:29:33 +0000 (20:29 +0000)
committerMatt Fleming <matt.fleming@linux.intel.com>
Tue, 15 Mar 2011 21:15:03 +0000 (21:15 +0000)
Add ctrl-p and ctrl-n key binds to get the prev and next
command. They are much easier to reach than KEY_UP and
KEY_DOWN.

Signed-off-by: Liu Aleaxander <Aleaxander@gmail.com>
Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
com32/elflink/ldlinux/cli.c

index 7a68545..130dc6d 100644 (file)
@@ -285,6 +285,7 @@ const char *edit_cmdline(const char *input, int top /*, int width */ ,
                redraw = 1;
            }
            break;
+       case KEY_CTRL('P'):
        case KEY_UP:
            {
                if (!list_empty(&cli_history_head)) {
@@ -301,6 +302,7 @@ const char *edit_cmdline(const char *input, int top /*, int width */ ,
                }
            }
            break;
+       case KEY_CTRL('N'):
        case KEY_DOWN:
            {
                if (!list_empty(&cli_history_head)) {