X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Fdrv%2Fkb.c;h=d6124e7fc02b9cf4795072b19d9b5fc7a19aff36;hb=71d97264ff059a530d86584f690a43831468dc69;hp=9a41728e80179de62fb00e8e01e883a19418d4fc;hpb=8fe1e7d56bb809bb3f1f47ee9b3946e5294a7352;p=tpg%2Facess2.git diff --git a/Kernel/drv/kb.c b/Kernel/drv/kb.c index 9a41728e..d6124e7f 100644 --- a/Kernel/drv/kb.c +++ b/Kernel/drv/kb.c @@ -66,7 +66,7 @@ void KB_IRQHandler() { Uint8 scancode; Uint32 ch; - int keyNum; + // int keyNum; //if( inportb(0x64) & 0x20 ) return; @@ -105,14 +105,11 @@ void KB_IRQHandler() // Translate ch = gpKB_Map[giKB_KeyLayer][scancode]; - keyNum = giKB_KeyLayer * 256 + scancode; + //keyNum = giKB_KeyLayer * 256 + scancode; // Check for unknown key if(!ch && !gbKB_KeyUp) Warning("UNK %i %x", giKB_KeyLayer, scancode); - if(keyNum > 128) - Log("keyNum = %i\n", keyNum); - // Reset Layer giKB_KeyLayer = 0; @@ -120,7 +117,7 @@ void KB_IRQHandler() if (gbKB_KeyUp) { gbKB_KeyUp = 0; - gbaKB_States[ keyNum ] = 0; // Unset key state flag + gbaKB_States[ ch ] = 0; // Unset key state flag if( !gbaKB_States[KEY_LSHIFT] && !gbaKB_States[KEY_RSHIFT] ) gbKB_ShiftState = 0; @@ -132,7 +129,7 @@ void KB_IRQHandler() } // Set the bit relating to the key - gbaKB_States[keyNum] = 1; + gbaKB_States[ch] = 1; if(ch == KEY_LSHIFT || ch == KEY_RSHIFT) gbKB_ShiftState = 1; @@ -146,9 +143,8 @@ void KB_IRQHandler() if(ch == 0 || ch & 0x80) return; // --- Check for Kernel Magic Combos - if(gbaKB_States[KEY_LCTRL])// && gbaKB_States[KEY_LALT]) + if(gbaKB_States[KEY_LCTRL] && gbaKB_States[KEY_LALT]) { - LOG("ch = 0x%02x", ch); switch(ch) { case 'd': __asm__ __volatile__ ("xchg %bx, %bx"); break;