Support windows putty "\b"(Ctrl-H) backspace key. Signed-off-by: Xueming Li <xuemi...@mellanox.com> --- lib/librte_cmdline/cmdline_rdline.c | 1 + lib/librte_cmdline/cmdline_vt100.c | 1 + lib/librte_cmdline/cmdline_vt100.h | 1 + 3 files changed, 3 insertions(+)
diff --git a/lib/librte_cmdline/cmdline_rdline.c b/lib/librte_cmdline/cmdline_rdline.c index 1ef2258d0..167657f4b 100644 --- a/lib/librte_cmdline/cmdline_rdline.c +++ b/lib/librte_cmdline/cmdline_rdline.c @@ -331,6 +331,7 @@ rdline_char_in(struct rdline *rdl, char c) /* delete 1 char from the left */ case CMDLINE_KEY_BKSPACE: + case CMDLINE_KEY_BKSPACE1: if(!cirbuf_del_tail_safe(&rdl->left)) { rdline_puts(rdl, vt100_bs); display_right_buffer(rdl, 1); diff --git a/lib/librte_cmdline/cmdline_vt100.c b/lib/librte_cmdline/cmdline_vt100.c index a253e8b6c..bb317507e 100644 --- a/lib/librte_cmdline/cmdline_vt100.c +++ b/lib/librte_cmdline/cmdline_vt100.c @@ -95,6 +95,7 @@ const char *cmdline_vt100_commands[] = { "\020", "\016", "\033\144", + "\b", }; void diff --git a/lib/librte_cmdline/cmdline_vt100.h b/lib/librte_cmdline/cmdline_vt100.h index 963add8df..c803734fa 100644 --- a/lib/librte_cmdline/cmdline_vt100.h +++ b/lib/librte_cmdline/cmdline_vt100.h @@ -117,6 +117,7 @@ extern "C" { #define CMDLINE_KEY_CTRL_P 23 #define CMDLINE_KEY_CTRL_N 24 #define CMDLINE_KEY_META_D 25 +#define CMDLINE_KEY_BKSPACE1 26 extern const char *cmdline_vt100_commands[]; -- 2.13.3