From aa5aa4482314078c52f86226a1753511d3f4a4cb Mon Sep 17 00:00:00 2001 From: Alexis211 Date: Wed, 2 Sep 2009 12:36:52 +0200 Subject: Maybee some changes --- Source/Kernel/Devices/Keyboard/PS2Keyboard.class.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Source/Kernel/Devices/Keyboard') diff --git a/Source/Kernel/Devices/Keyboard/PS2Keyboard.class.cpp b/Source/Kernel/Devices/Keyboard/PS2Keyboard.class.cpp index f5216c7..bacfbe9 100644 --- a/Source/Kernel/Devices/Keyboard/PS2Keyboard.class.cpp +++ b/Source/Kernel/Devices/Keyboard/PS2Keyboard.class.cpp @@ -6,6 +6,14 @@ using namespace Sys; PS2Keyboard::PS2Keyboard() { Dev::requestIRQ(this, 1); + + //Read all waiting characters, so that keyboard buffer is empty + u8int temp = inb(0x60), temp2 = 0; + while (temp != temp2) { + temp2 = temp; + temp = inb(0x60); + } + m_escaped = false; } -- cgit v1.2.3