diff --git a/17_day/bootpack.c b/17_day/bootpack.c index 36c7600..4866743 100644 --- a/17_day/bootpack.c +++ b/17_day/bootpack.c @@ -44,7 +44,7 @@ void HariMain(void) 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '_', 0, 0, 0, 0, 0, 0, 0, 0, 0, '|', 0, 0 }; - int key_to = 0, key_shift = 0; + int key_to = 0, key_shift = 0, key_leds = (binfo->leds >> 4) & 7; init_gdtidt(); init_pic(); @@ -144,6 +144,11 @@ void HariMain(void) } else { s[0] = 0; } + if ('A' <= s[0] && s[0] <= 'Z') { /*当输入字符为英文字母时*/ + if (((key_leds & 4) == 0 && key_shift == 0) ||((key_leds & 4) != 0 && key_shift != 0)) { + s[0] += 0x20; /*将大写字母转换为小写字母*/ + } + } if (s[0] != 0) { /*一般字符*/ if (key_to == 0) { /*发送给任务A */ if (cursor_x < 128) {