I'm able to catch the interrupts but for some reason scan code set 1 is used. I've even tried to manually set scan code 2 (with reference to the wiki, and here), but scan code 1 is still being used.
For example, when I press the ctrl, the letter 'w' appears (scan code 0x1D is retrieved - which is scan code set 1 ctrl, and scan code 2 set 'w').
My keyboard handler initialisation code:
Code: Select all
// Initialise the event buffer
kb = malloc(sizeof(KeyboardEvent_t *) * (KB_BUFFER_MAX_SIZE+1));
kb[0] = malloc(sizeof(KeyboardEvent_t));
KBEVENT_END(kb[0]->flags);
// Initialise the flags
kb_flags = 0x0;
// Set the first event to the end of the event buffer
KBEVENT_END(kb[0]);
// Install the interupt handler
irq_install_handler(1, keyboard_handler);
Code: Select all
outportb(0x60, 0xF0);
while (!(inportb(0x60) == 0xfa));
outportb(0x60, 0x02);
Code: Select all
scancode = inportb(0x60);