fix keyboard scan code parse bug; f**k u idiot lml

This commit is contained in:
catfood 2023-01-19 22:35:30 +08:00
parent 44e2862131
commit f9a75fa1e4

View File

@ -360,11 +360,12 @@ static void kbd_process(unsigned char scode)
set_leds();
}
break;
default:
if (press)
cur_ntty->recvbuf(cur_ntty, map_key(code));
}
// inputdriver_send_event(FALSE /*mouse*/, page, code, press, 0);
if (press)
cur_ntty->recvbuf(cur_ntty, map_key(code));
}
kbd_state = 0;
@ -513,7 +514,8 @@ void ps2_tty_recvbuf(NTTY *tty, u32 key)
break;
default:
while (xchg(&kbdlock, 1) == 1);
while (xchg(&kbdlock, 1) == 1)
sys_yield();
if ((key & 0xff) == 0)
return;
if (kbd->len == TTY_IN_BYTES - 1)