Skip to content

Commit

Permalink
🐛键盘驱动
Browse files Browse the repository at this point in the history
  • Loading branch information
miny1233 authored and StevenBaby committed Apr 6, 2023
1 parent 68a68ca commit ecc2184
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/kernel/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ void keyboard_handler(int vector)

// 计算 shift 状态
bool shift = false;
if (capslock_state && ('a' <= keymap[makecode][0] <= 'z'))
if (capslock_state && ('a' <= keymap[makecode][0] && keymap[makecode][0] <= 'z'))
{
shift = !shift;
}
Expand Down Expand Up @@ -429,4 +429,4 @@ void keyboard_init()
DEV_CHAR, DEV_KEYBOARD,
NULL, "keyboard", 0,
NULL, keyboard_read, NULL);
}
}

0 comments on commit ecc2184

Please sign in to comment.