Feat: Keyboard strokes working and in buffer

This commit is contained in:
AfonsoCMSousa
2026-08-05 02:23:54 +01:00
parent fb27ad1e0c
commit ba16f38c79
6 changed files with 161 additions and 56 deletions
+11 -6
View File
@@ -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) {