From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id 2277E29CA for ; Thu, 7 Dec 2017 15:28:37 +0100 (CET) Received: from core.dev.6wind.com (unknown [10.0.0.1]) by proxy.6wind.com (Postfix) with ESMTPS id 3810A10FA79; Thu, 7 Dec 2017 15:20:32 +0100 (CET) Received: from [10.16.0.195] (helo=6wind.com) by core.dev.6wind.com with smtp (Exim 4.84_2) (envelope-from ) id 1eMxA1-0004DY-OU; Thu, 07 Dec 2017 15:28:26 +0100 Received: by 6wind.com (sSMTP sendmail emulation); Thu, 07 Dec 2017 15:28:25 +0100 Date: Thu, 7 Dec 2017 15:28:25 +0100 From: Olivier MATZ To: Xueming Li Cc: dev@dpdk.org Message-ID: <20171207142824.r5kezdwezj6ke5xt@glumotte.dev.6wind.com> References: <20171115155156.9566-1-xuemingl@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171115155156.9566-1-xuemingl@mellanox.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH] 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:28:37 -0000 Hi Xueming, On Wed, Nov 15, 2017 at 11:51:56PM +0800, Xueming Li wrote: > 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..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); I would have used CMDLINE_KEY_BKSPACE2 instead of CMDLINE_KEY_BKSPACE1 :) > 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 You can reuse vt100_bs instead of '\b', which is defined in cmdline_vt100.h (note that '\010' == '\b') Thanks Olivier