From dbeb6aa204f4b94f42f4fec5a2f530a8dd6ea2ca Mon Sep 17 00:00:00 2001 From: JimmyBinoculars Date: Thu, 26 Feb 2026 18:18:05 +0000 Subject: [PATCH] Proper backspace support --- Makefile | 1 - kernel.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0a7eed1..79e79fa 100644 --- a/Makefile +++ b/Makefile @@ -76,7 +76,6 @@ QEMU_FLAGS = -machine q35 \ -drive if=pflash,format=raw,file=$(BUILD_DIR)/OVMF_VARS.fd \ -drive format=raw,file=fat:rw:$(BUILD_DIR) \ -net none \ - -nographic \ -no-reboot # Phony targets diff --git a/kernel.c b/kernel.c index e07b391..38f105e 100644 --- a/kernel.c +++ b/kernel.c @@ -93,8 +93,8 @@ void kmain(BootInfo *Boot) // Reset for next command len = 0; SAFE_PRINT(Boot, L"-> "); - } else if (Key.UnicodeChar == L'\b' || Key.UnicodeChar == 0x7F) { - // Backspace + } else if (Key.ScanCode == 0x08 || Key.UnicodeChar == L'\b' || Key.UnicodeChar == 0x7F) { + // Backspace (ScanCode 0x08 is backspace in UEFI) if (len > 0) { len--; SAFE_PRINT(Boot, L"\b \b");