Funny keyboard glitch can someone please help me? [Solved]
Posted: Sun Jan 23, 2011 2:22 pm
I started using keyboard input support in my kernel, but when ever I type it seems to add a lot of characters which are strange. I think it has to do with my while loop code here have a look at the code and the picture.
Code: Select all
char msg[1000];
int i = 0;
unsigned char scancode = inportb(0x60);
while(kbdus[scancode] != 'c')
{
scancode = inportb(0x60);
printstring("Press and Key To Type... and press c to clear and close. ", 79, 2);
if (kbdus[scancode] != 0)
{
stringcat(msg, &kbdus[scancode]);
}
printstring(msg, 79, 3);
}
clear_screen();