mirror of
https://github.com/cfenollosa/os-tutorial.git
synced 2024-10-27 20:34:19 +00:00
added comments
This commit is contained in:
parent
47badebd18
commit
8a5e637701
@ -31,10 +31,11 @@ static void keyboard_callback(registers_t regs) {
|
|||||||
kprint_backspace();
|
kprint_backspace();
|
||||||
} else if (scancode == ENTER) {
|
} else if (scancode == ENTER) {
|
||||||
kprint("\n");
|
kprint("\n");
|
||||||
user_input(key_buffer);
|
user_input(key_buffer); /* kernel-controlled function */
|
||||||
key_buffer[0] = '\0';
|
key_buffer[0] = '\0';
|
||||||
} else {
|
} else {
|
||||||
char letter = sc_ascii[(int)scancode];
|
char letter = sc_ascii[(int)scancode];
|
||||||
|
/* Remember that kprint only accepts char[] */
|
||||||
char str[2] = {letter, '\0'};
|
char str[2] = {letter, '\0'};
|
||||||
append(key_buffer, letter);
|
append(key_buffer, letter);
|
||||||
kprint(str);
|
kprint(str);
|
||||||
|
Loading…
Reference in New Issue
Block a user