fix: capslock support uggly code to fix bug uwu

This commit is contained in:
starnakin 2024-09-08 19:56:34 +02:00
parent 0ea82d6b4d
commit 662a75d233

View File

@ -12,9 +12,11 @@ uint8_t terminal_getkey(void)
uint8_t scan_code; uint8_t scan_code;
scan_code = inb(KEYBOARD_PORT); scan_code = inb(KEYBOARD_PORT);
if (scan_code == KEY_RIGHT_SHIFT || scan_code == KET_LEFT_SHIFT) // || scan_code == KEY_CAPSLOCK) if (scan_code == 0x3A || scan_code == 0x58)
caps = !caps;
else if (scan_code == KEY_RIGHT_SHIFT || scan_code == KET_LEFT_SHIFT)
caps = true; caps = true;
else if (scan_code == KEY_RIGHT_SHIFT + 128 || scan_code == KET_LEFT_SHIFT + 128) // || scan_code == KEY_CAPSLOCK + 128) else if (scan_code == KEY_RIGHT_SHIFT + 128 || scan_code == KET_LEFT_SHIFT + 128)
caps = false; caps = false;
else if (scan_code != prev_scan_code && prev_scan_code != 0) { else if (scan_code != prev_scan_code && prev_scan_code != 0) {
if (scan_code < 128 && keymap[scan_code]) if (scan_code < 128 && keymap[scan_code])