mirror of
https://github.com/ipxe/ipxe
synced 2025-12-17 10:01:03 +03:00
[riscv] Map DEL to backspace on the SBI debug console
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user