BAS: Accept either BS or DEL as the backspace charactger

This commit is contained in:
Gregory Nutt 2014-11-09 08:19:51 -06:00
parent 799de0c6b5
commit 58878c6ec9

View File

@ -78,6 +78,8 @@
#include <time.h>
#include <unistd.h>
#include <nuttx/ascii.h>
#include "vt100.h"
#include "fs.h"
@ -282,7 +284,16 @@ static int edit(int chn, int onl)
return -1;
}
if (ch == '\b')
/* Check for backspace
*
* There are several notions of backspace, for an elaborate summary see
* http://www.ibb.net/~anne/keyboard.html. There is no clean solution.
* Here both DEL and backspace are treated like backspace here. The
* Unix/Linux screen terminal by default outputs DEL (0x7f) when the
* backspace key is pressed.
*/
if (ch == ASCII_BS || ch == ASCII_DEL)
{
if (f->inCapacity)
{