orbkb: Keyboard handling library for Orbital #941
Closed
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.
First up, apologies for this massive drive-by PR! I did this for fun and wasn't expecting to write this much code (or even submit any of it) when I started so please don't feel any pressure to merge it. I think this contains some useful new features so thought you might be interested!
Problem:
There's a number of basic features missing from RedoxOS's current keyboard implementation.
Solution:
I've created a new library called
orbkb
* which contains a bunch of keyboard handling code and integrated it into the rest of the system. This adds the following new features to RedoxOS:* The reason it's separate from
orbclient
is because I couldn't getcargo test
to work.Components of orbkb
orbkb
is rexported fromorbclient
asorbclient::kb
. I think it would be best to merge it into orbclient when the test issues are fixed.Why logical keyboard events?
Logical keyboard events simplify the keyboard handling in applications that are driven by text input (terminals, text editors, etc) as there's a number of cases when these type of applications should not intepret a a physical "key press" event as user input, for example:
Ctrl+c
)LKEs allow these features to be implemented centrally in
ps2d
and applications just have to listen for keyboard events that contain a "logical" part. Applications that rely on physical keyboard input, such as games, can just ignore the "logical" part.Changes introduced by this pull request:
Drawbacks:
TODOs:
Fixes:
None of the issues above are reported in a Github issue
State: Ready
Blocking/related: