From 8c1ad5939936de051229123b210d7f9e70c83d14 Mon Sep 17 00:00:00 2001 From: jkh Date: Tue, 28 Nov 2000 20:03:23 +0000 Subject: Kernel support for erase2 character. Submitted by: Rui Pedro Mendes Salgueiro --- sys/kern/tty.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'sys/kern/tty.c') diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 87fb980..1117708 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -459,9 +459,9 @@ parmrk: * processing takes place. */ /* - * erase (^H / ^?) + * erase or erase2 (^H / ^?) */ - if (CCEQ(cc[VERASE], c)) { + if (CCEQ(cc[VERASE], c) || CCEQ(cc[VERASE2], c) ) { if (tp->t_rawq.c_cc) ttyrub(unputc(&tp->t_rawq), tp); goto endcase; @@ -2010,8 +2010,17 @@ ttyrub(c, tp) (void)ttyoutput('\\', tp); } ttyecho(c, tp); - } else + } else { ttyecho(tp->t_cc[VERASE], tp); + /* + * This code may be executed not only when an ERASE key + * is pressed, but also when ^U (KILL) or ^W (WERASE) are. + * So, I didn't think it was worthwhile to pass the extra + * information (which would need an extra parameter, + * changing every call) needed to distinguish the ERASE2 + * case from the ERASE. + */ + } --tp->t_rocount; } -- cgit v1.1