[syslinux] [PATCH 4/4] elflink: Add Ctrl-p + Ctrl-n key binds

Liu Aleaxander aleaxander at gmail.com
Sat Oct 2 09:36:12 PDT 2010


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 at gmail.com>
---
 core/elflink/cli.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/core/elflink/cli.c b/core/elflink/cli.c
index 3099cb4..408921e 100644
--- a/core/elflink/cli.c
+++ b/core/elflink/cli.c
@@ -281,6 +281,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)) {
@@ -297,6 +298,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)) {
-- 
1.7.0.1




More information about the Syslinux mailing list