Home | Reviews | GUIpedia | Forum | Fun500
aguma | OS: Keyboard handlerHow do I get it so that it won't keep typing UPPERCASE after you let go of shift? Aren't 170 and 182 the scan codes for the left and right shift releases? If they are, something's wrong with my program :P. Code: [code]void keyboard_handler(struct regs *r) { char new_scan_code = inportb(0x60); keydown = 0; keypress = ""; switch(new_scan_code) { case 170: case 182: shift_state = 0; break; case 54: shift_state = 1; break; case 42: shift_state = 1; break; default: if (new_scan_code & 0x80) { } else { keypress = (shift_state ? kbdusu:kbdus)[new_scan_code]; keydown = 1; } break; } outportb(0x20,0x20); }[/code] | 2009-05-18 | 10:32 PM |
2021 Brandon Cornell