This commit is contained in:
Eggert Jung
2025-05-13 16:24:44 +02:00
parent b0f129141a
commit 2421136335
3 changed files with 12 additions and 5 deletions

View File

@@ -9,6 +9,8 @@
#include "../device/ps2controller.h"
#include "../sync/ticketlock.h"
void printContext(const InterruptContext *context) {
DBG << "ip: " << hex << context->cs << ':' << context->ip
<< " sp: " << context->ss << ':' << context->sp << " flags" << bin
@@ -68,12 +70,16 @@ enum PAGE_FAULT_ERROR {
}
extern TextStream kout;
extern Ticketlock ticketlock;
void handle_keyboard() {
//dout[0] << "test"<<endl<<flush;
ticketlock.lock();
Key key = Key();
if (PS2Controller::fetch(key)) {
kout << key.ascii() << flush ;
kout << key.ascii() << endl << flush ;
}
ticketlock.unlock();
LAPIC::endOfInterrupt();
}