summaryrefslogtreecommitdiff
path: root/lib/librte_cmdline
diff options
context:
space:
mode:
authorXueming Li <xuemingl@mellanox.com>2017-12-07 22:52:02 +0800
committerThomas Monjalon <thomas@monjalon.net>2018-01-15 12:04:57 +0100
commitc89dc62533ac3b8a09e3b9f07a2aa1780ac7118a (patch)
treeeeb57b1ede54c8cf34e582397b9f6d7ad7d81c73 /lib/librte_cmdline
parentaac6f11f586480f9222dba99910654eda989c649 (diff)
downloaddpdk-next-eventdev-c89dc62533ac3b8a09e3b9f07a2aa1780ac7118a.zip
dpdk-next-eventdev-c89dc62533ac3b8a09e3b9f07a2aa1780ac7118a.tar.gz
dpdk-next-eventdev-c89dc62533ac3b8a09e3b9f07a2aa1780ac7118a.tar.xz
cmdline: support backspace key
Support windows putty "\b"(Ctrl-H) backspace key. Signed-off-by: Xueming Li <xuemingl@mellanox.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
Diffstat (limited to 'lib/librte_cmdline')
-rw-r--r--lib/librte_cmdline/cmdline_rdline.c1
-rw-r--r--lib/librte_cmdline/cmdline_vt100.c1
-rw-r--r--lib/librte_cmdline/cmdline_vt100.h1
3 files changed, 3 insertions, 0 deletions
diff --git a/lib/librte_cmdline/cmdline_rdline.c b/lib/librte_cmdline/cmdline_rdline.c
index 1ef2258..a1aa88c 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_BKSPACE2:
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 a253e8b..c7b8e60 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",
+ vt100_bs,
};
void
diff --git a/lib/librte_cmdline/cmdline_vt100.h b/lib/librte_cmdline/cmdline_vt100.h
index 963add8..b94b24e 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_BKSPACE2 26
extern const char *cmdline_vt100_commands[];