summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-07-11 07:21:31 +0000
committerIan Moffett <ian@osmora.org>2025-07-11 07:21:31 +0000
commita69bc45cf4bc3c3bc48609c19c64167ffb247d6f (patch)
tree7183215e0222dafb28ba790d0feeb3d01456e07f
parentbf8ab9fe3c6e9aaff3e26e65c2786b56f88e8f6e (diff)
kernel/amd64: i8042: Decode ESCAPE key
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r--sys/arch/amd64/isa/i8042.c6
1 files changed, 5 insertions, 1 deletions
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 <sys/syslog.h>
#include <sys/spinlock.h>
#include <sys/param.h>
+#include <sys/ascii.h>
#include <sys/proc.h>
#include <sys/reboot.h>
#include <sys/queue.h>
@@ -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:
/*