aboutsummaryrefslogtreecommitdiff
path: root/mubios/services/int16.c
diff options
context:
space:
mode:
Diffstat (limited to 'mubios/services/int16.c')
-rw-r--r--mubios/services/int16.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/mubios/services/int16.c b/mubios/services/int16.c
index 4a04828..5872fb1 100644
--- a/mubios/services/int16.c
+++ b/mubios/services/int16.c
@@ -27,6 +27,18 @@
#define BDA_KBD_BUFFER_END 0x003Eu
static u8
+normalize_scancode (u8 scancode)
+{
+ switch (scancode)
+ {
+ case 0x5Au:
+ return 0x1Cu;
+ default:
+ return scancode;
+ }
+}
+
+static u8
scancode_to_ascii (u8 scancode)
{
switch (scancode)
@@ -126,7 +138,7 @@ int16_service (struct bios_regs *regs)
position = *head;
value = buffer[(position - BDA_KBD_BUFFER_START) >> 1];
- scancode = (u8)(value >> 8);
+ scancode = normalize_scancode ((u8)(value >> 8));
ascii = scancode_to_ascii (scancode);
regs->eax = ((u32)scancode << 8) | ascii;