From 125fe2b406ef56c472947be5b731fa9adaf303da Mon Sep 17 00:00:00 2001 From: Liu Aleaxander Date: Tue, 15 Mar 2011 20:29:33 +0000 Subject: [PATCH] elflink: Add Ctrl-p + Ctrl-n key binds 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 Signed-off-by: Matt Fleming --- com32/elflink/ldlinux/cli.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/com32/elflink/ldlinux/cli.c b/com32/elflink/ldlinux/cli.c index 7a68545..130dc6d 100644 --- a/com32/elflink/ldlinux/cli.c +++ b/com32/elflink/ldlinux/cli.c @@ -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)) { -- 2.7.4