aboutsummaryrefslogtreecommitdiffstats
path: root/keyboard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'keyboard.cpp')
-rw-r--r--keyboard.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/keyboard.cpp b/keyboard.cpp
index 29178f9..db7743c 100644
--- a/keyboard.cpp
+++ b/keyboard.cpp
@@ -10,6 +10,7 @@
extern TextOutput& term;
static CircularBuffer<char> keyboardBuffer;
+static Port<0x60> keyboardPort;
static const std::array<char, 0x59> ScanCodeSet1 {{
0, K_ESCAPE,
@@ -38,7 +39,7 @@ void keyboard_initialize()
keyboardBuffer = CircularBuffer<char>(128);
idt_register_callback(33, [](auto& regs) {
- const auto kc = inb(0x60);
+ const std::uint8_t kc = keyboardPort;
if (!isReleased(kc)) {
const auto ch = ScanCodeSet1[keycode(kc)];