Block process while waiting for keyboard input#34
Merged
ryuukumar merged 6 commits intohw/keyboardfrom Apr 25, 2026
Merged
Conversation
ryuukumar
added a commit
that referenced
this pull request
Apr 25, 2026
* Setup basic keyboard init * Add keyboard interrupt handler * Ignore compile_commands.json * Remove return from kb_handler and mark registers unused * Fix bug where kb handler would permahang because IRQ would be permaset * Add a keypress map * Include it + minor fixes * Add some extended keyboard actions * Add some util functions * Add statemachine struct and parser for scancode 1 * Use map_keypress in keyboard handler * Remove the while loop from the handler * Add pop_next_char * Expose do_sched_yield * Add stdin_read * Add optional tty handler which keyboard may call * Block process while waiting for keyboard input (#34) * Add inode info * Inject chardev_info * Add a simple process block * Add block and unblock * Format * Block process when char unavailable * Fix issue causing a permaloop + format * Hover the user process Without this, the kernel process also goes unblocked, which means the scheduler sees that there are no processes to run. That causes it to hang, since we do not handle that specially. * Change the hover loop of kernel thread to echo keypresses * Filter by regular character only (no action keys) * Remove the print statement for every keypress * Handle backspaces in console * do_sched_yield can be static
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.