about summary refs log tree commit diff
path: root/src/pOS/arch/x86/kernel/drivers/keyboard/keyboard.cpp
blob: c32cbdbc4f5fe8e8345f4fc92343854d0a004bcf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "include/keyboard.h"

void keyboard_handler(struct regs *r)
{
    UNUSED_VARIABLE(r);

    /* Read from the keyboard's data buffer */
    unsigned char scancode = System::inb(0x60);

    //dbgprintf("Sc: %d\n", scancode);

    if(!KB_BUF::scan(scancode))
        putc(KB_BUF::keyboard_dequeue());
}