Feat: Keyboard strokes working and in buffer
This commit is contained in:
@@ -25,16 +25,21 @@ void kmain(void) {
|
||||
printf("SoraOS Kernel Initialized\n");
|
||||
printf("\tWelcome to SoraOS\n");
|
||||
printf("\tKernel Version %s\n", __KERNEL_VERSION);
|
||||
// printf("\tCompiled on: %s at %s\n\n", __DATE__, __TIME__);
|
||||
printf("\tCompiled on: %s at %s\n\n", __DATE__, __TIME__);
|
||||
|
||||
// TODO: CLI IDEA
|
||||
// int _count = printf("%s@%s:>", current_user.user_name, current_user.user_hostname);
|
||||
// scursor(_count, text_pos.line);
|
||||
int _count = printf("%s@%s:>", current_user.user_name, current_user.user_hostname);
|
||||
//scursor(_count, text_pos.line);
|
||||
|
||||
// TODO: Enable user input handling
|
||||
// char input_buffer[256];
|
||||
// scanf("%s", input_buffer);
|
||||
// printf("\nYou entered: %s\n", input_buffer);
|
||||
char input_buffer[256] = {0};
|
||||
gets(input_buffer, sizeof(input_buffer));
|
||||
|
||||
printf("Input buffer contents in hex:\n");
|
||||
for (int i = 0; input_buffer[i] != '\0'; i++) {
|
||||
printf("[%x]", (unsigned char)input_buffer[i]);
|
||||
}
|
||||
printf("\nYou entered: %s\n", input_buffer);
|
||||
|
||||
// Infinite loop
|
||||
while (1) {
|
||||
|
||||
Reference in New Issue
Block a user