aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatasha Moongrave <natasha@256phi.eu>2026-03-11 11:10:00 +0100
committerNatasha Moongrave <natasha@256phi.eu>2026-03-11 11:10:00 +0100
commit3a401a6cfba854ab15c5f5986d7a1318bd795295 (patch)
tree6e5b002880d3a08c1b66d98581bcbecdcabda10e
parent2b4e3f8e68e0fd2c75fb1ca289b632c7dc655d72 (diff)
added support to handle scancodes and print them to the screen
-rw-r--r--StrixKernel/src/interrupts.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/StrixKernel/src/interrupts.rs b/StrixKernel/src/interrupts.rs
index 039cb3c..bb025cb 100644
--- a/StrixKernel/src/interrupts.rs
+++ b/StrixKernel/src/interrupts.rs
@@ -87,6 +87,11 @@ extern "x86-interrupt" fn timer_interrupt_handler(
extern "x86-interrupt" fn keyboard_interrupt_handler(
_stack_frame: InterruptStackFrame)
{
+ use x86_64::instructions::port::Port;
+
+ let mut port = port::new(0x60);
+ let scancode: u8 = unsafe { port.read() };
+ print("{}", scancode);
print!("k");
unsafe {