DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] lib/cmdline: support backspace key
@ 2017-11-15 15:51 Xueming Li
  2017-12-07 14:28 ` Olivier MATZ
  2017-12-07 14:52 ` [dpdk-dev] [PATCH v1] " Xueming Li
  0 siblings, 2 replies; 5+ messages in thread
From: Xueming Li @ 2017-11-15 15:51 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Xueming Li, dev

Support windows putty "\b"(Ctrl-H) backspace key.

Signed-off-by: Xueming Li <xuemingl@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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-01-15 11:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-15 15:51 [dpdk-dev] [PATCH] lib/cmdline: support backspace key Xueming Li
2017-12-07 14:28 ` Olivier MATZ
2017-12-07 14:52 ` [dpdk-dev] [PATCH v1] " Xueming Li
2017-12-07 15:34   ` Olivier MATZ
2018-01-15 11:05     ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).