From a69bc45cf4bc3c3bc48609c19c64167ffb247d6f Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Fri, 11 Jul 2025 07:21:31 +0000 Subject: kernel/amd64: i8042: Decode ESCAPE key Signed-off-by: Ian Moffett --- sys/arch/amd64/isa/i8042.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys/arch/amd64/isa') diff --git a/sys/arch/amd64/isa/i8042.c b/sys/arch/amd64/isa/i8042.c index 69d9f92..cde70ff 100644 --- a/sys/arch/amd64/isa/i8042.c +++ b/sys/arch/amd64/isa/i8042.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -75,7 +76,7 @@ static int i8042_kb_getc(uint8_t sc, char *chr); static void i8042_drain(void); static char keytab[] = { - '\0', '\0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', + '\0', '\x1B', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=', '\b', '\t', 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '[', ']', '\n', '\0', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', '\'', '`', '\0', '\\', 'z', 'x', 'c', 'v', @@ -276,6 +277,9 @@ i8042_kb_getc(uint8_t sc, char *chr) bool release = ISSET(sc, BIT(7)); switch (sc) { + case 0x76: + *chr = ASCII_ESC; + return 0; /* Caps lock [press] */ case 0x3A: /* -- cgit v1.2.3