[riscv] Map DEL to backspace on the SBI debug console

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2025-04-19 12:18:53 +01:00
parent 1291dc39fd
commit 423cdbeb39
2 changed files with 7 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <ipxe/sbi.h>
#include <ipxe/io.h>
#include <ipxe/keys.h>
#include <ipxe/console.h>
#include <config/console.h>
@@ -65,6 +66,11 @@ static int sbi_getchar ( void ) {
/* Consume and return buffered character, if any */
character = sbi_console_input;
sbi_console_input = 0;
/* Convert DEL to backspace */
if ( character == DEL )
character = BACKSPACE;
return character;
}

View File

@@ -47,6 +47,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define LF CTRL_J
#define CR CTRL_M
#define ESC 0x1b
#define DEL 0x7f
/*
* Special keys outside the normal Unicode range