From 2d06e157958c6973e2c36f3ad07831e8ef8c8079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Strohh=C3=A4cker?= Date: Sun, 18 Dec 2005 21:22:42 +0000 Subject: [PATCH] remove enhanced-attribute of keys in PCJr keyboard layer Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2416 --- src/ints/bios_keyboard.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/ints/bios_keyboard.cpp b/src/ints/bios_keyboard.cpp index 341c969d..ed0aa613 100644 --- a/src/ints/bios_keyboard.cpp +++ b/src/ints/bios_keyboard.cpp @@ -438,21 +438,23 @@ irq1_return: return CBRET_NONE; } -static bool pcjr_extended_key=false; - static Bitu IRQ6_Handler(void) { Bit8u scancode=IO_Read(0x60); - Bit16u old_ax=reg_ax; - if (pcjr_extended_key) reg_ax=scancode<<8; - else reg_al=scancode; - pcjr_extended_key=(scancode==0xe0); - /* call the real keyboard IRQ now, with the scancode in AL */ - CALLBACK_RunRealInt(0x09); - reg_ax=old_ax; + /* skip extended keys, all of them should map quite nicely + onto corresponding non-extended keys */ + if (scancode!=0xe0) { + Bit16u old_ax=reg_ax; + reg_al=scancode; + /* call the real keyboard IRQ now, with the scancode in AL */ + CALLBACK_RunRealInt(0x09); + reg_ax=old_ax; + } + IO_Write(0x20,0x20); return CBRET_NONE; } + /* check whether key combination is enhanced or not, translate key if necessary */ static bool IsEnhancedKey(Bit16u &key) {