summaryrefslogtreecommitdiff
path: root/Source/Kernel/Devices/Keyboard
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-09-02 12:36:52 +0200
committerAlexis211 <alexis211@gmail.com>2009-09-02 12:36:52 +0200
commitaa5aa4482314078c52f86226a1753511d3f4a4cb (patch)
tree63663f87a5375a957829d85f6d11d268cbdd1f4b /Source/Kernel/Devices/Keyboard
parent8c9f3cc95987f2aee2771d96a0956241b6f96cb3 (diff)
downloadMelon-aa5aa4482314078c52f86226a1753511d3f4a4cb.tar.gz
Melon-aa5aa4482314078c52f86226a1753511d3f4a4cb.zip
Maybee some changes
Diffstat (limited to 'Source/Kernel/Devices/Keyboard')
-rw-r--r--Source/Kernel/Devices/Keyboard/PS2Keyboard.class.cpp8
1 files changed, 8 insertions, 0 deletions
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;
}