r/osdev • u/The_Coding_Knight • 9d ago
Keyboard interrupts firing when key is pressed but not when key is released
I am returning to my OS project after 4 months (lack of time unfortunately.. sigh) and I am trying to continue from where I left. I recently tested whether keyboard interrupts were working or not and they are partially working.
As the title says, when pressing a key an interrupt is fired and the function that is supposed to handle keyboard interrupts receives it. Even though it should, when releasing the key, no interrupt is triggered.
I have tried to find information online but I only found information regarding keyboard interrupts not being fired at all.
Link to the repo: https://codeberg.org/TheCodingKnight/32-bit-Potato/src/branch/interrupts
src/kernel/int/int_handler/int_handler.c is in charge of calling the function that will handle the interrupt that was just fired. In the case of the irq1 (keyboard interrupt), the function in charge of handling it is handle_irq1 and the code can be found in src/kernel/int/int_handler/ps2.c
Note: Please bear with the fact that the controller does not handle very well scan codes that begin with a prefix. I know I have to fix that part, but I want to make sure the press/release part of the interrupts works well before supporting scan codes with prefixes (That is to say, limit your testing to scan codes without a prefixes like letters).
Of course, if you have any questions please let me know and I will be more than glad to answer asap.
2
u/SignedInt32 9d ago
You got discord? easier explaining I suppose.