From 7fe134307ecc585377ff195663eacc0f07a57494 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 9 Nov 2014 08:19:51 -0600 Subject: BAS: Accept either BS or DEL as the backspace charactger --- apps/interpreters/bas/fs.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/apps/interpreters/bas/fs.c b/apps/interpreters/bas/fs.c index 5895dc5c0..9f3489755 100644 --- a/apps/interpreters/bas/fs.c +++ b/apps/interpreters/bas/fs.c @@ -78,6 +78,8 @@ #include #include +#include + #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) { -- cgit v1.2.3