From 0b5641e3d609fad1739aa8c96bf21780d6af565a Mon Sep 17 00:00:00 2001 From: "bernard.xiong" Date: Sun, 25 Oct 2009 09:57:13 +0000 Subject: [PATCH] add backspace for hyper terminal git-svn-id: https://rt-thread.googlecode.com/svn/trunk@134 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- finsh/shell.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/finsh/shell.c b/finsh/shell.c index 706f69ffa6..9144c29beb 100644 --- a/finsh/shell.c +++ b/finsh/shell.c @@ -311,9 +311,9 @@ void finsh_thread_entry(void* parameter) /* * handle backspace key */ - if (ch == 0x7f) + if (ch == 0x7f || ch == 0x08) { - if (pos != 0) rt_kprintf("%c", ch); + if (pos != 0)rt_kprintf("%c", ch); line[pos--] = 0; if (pos < 0) pos = 0; continue; -- GitLab