From b7b4b42f19edcdc751688b691ad985d2e6fd91ff Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sun, 12 May 2024 19:31:02 -0400 Subject: kernel: vcons: Support ASCII_BS for backspace Signed-off-by: Ian Moffett --- sys/dev/vcons/vcons_io.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sys/dev/vcons') diff --git a/sys/dev/vcons/vcons_io.c b/sys/dev/vcons/vcons_io.c index 4c0151a..f4e693e 100644 --- a/sys/dev/vcons/vcons_io.c +++ b/sys/dev/vcons/vcons_io.c @@ -69,6 +69,12 @@ vcons_process_output(struct vcons_screen *scr, int c) case ASCII_HT: vcons_expand_tab(scr); break; + case ASCII_BS: + if (cursor->xpos > 0) { + scr->cpy_x--; + cursor->xpos -= FONT_WIDTH; + } + break; default: return -1; } -- cgit v1.2.3