浏览代码

add backspace for hyper terminal

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@134 bbd45198-f89e-11dd-88c7-29a3b14d5316
bernard.xiong 15 年之前
父节点
当前提交
0b5641e3d6
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      finsh/shell.c

+ 2 - 2
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;