From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id C739D37A2 for ; Thu, 7 Dec 2017 15:52:19 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from xuemingl@mellanox.com) with ESMTPS (AES256-SHA encrypted); 7 Dec 2017 16:52:16 +0200 Received: from dev-r630-06.mtbc.labs.mlnx (dev-r630-06.mtbc.labs.mlnx [10.12.205.180]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id vB7EqFuK009043; Thu, 7 Dec 2017 16:52:16 +0200 Received: from dev-r630-06.mtbc.labs.mlnx (localhost [127.0.0.1]) by dev-r630-06.mtbc.labs.mlnx (8.14.7/8.14.7) with ESMTP id vB7EqEEX162701; Thu, 7 Dec 2017 22:52:14 +0800 Received: (from xuemingl@localhost) by dev-r630-06.mtbc.labs.mlnx (8.14.7/8.14.7/Submit) id vB7Eq9og162671; Thu, 7 Dec 2017 22:52:09 +0800 From: Xueming Li To: Olivier MATZ Cc: Xueming Li , dev@dpdk.org Date: Thu, 7 Dec 2017 22:52:02 +0800 Message-Id: <20171207145202.162545-1-xuemingl@mellanox.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20171115155156.9566-1-xuemingl@mellanox.com> References: <20171115155156.9566-1-xuemingl@mellanox.com> Subject: [dpdk-dev] [PATCH v1] lib/cmdline: support backspace key X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 14:52:20 -0000 Support windows putty "\b"(Ctrl-H) backspace key. Signed-off-by: Xueming Li --- 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..a1aa88c96 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 a253e8b6c..c7b8e60bd 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 963add8df..b94b24e8c 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[]; -- 2.13.3