Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use CSI for key events #210

Merged
merged 2 commits into from
Jul 21, 2021
Merged

Use CSI for key events #210

merged 2 commits into from
Jul 21, 2021

Conversation

vinc
Copy link
Owner

@vinc vinc commented Jul 21, 2021

Initially some unicode chars where used for the arrow keys, but switching from ASCII to Extended ASCII introduced a visual bug for login and other programs reading an input line.

Dealing with unicode as bytes is error prone. This PR replace the unicode chars for arrow keys with their classic CSI equivalent. Userspace programs need to be updated because getting the char sequence for an arrow key require 3 calls to console::get_char instead of one, but this solution is more portable. It also mean the we will be able to be more interactive in serial mode.

https://en.wikipedia.org/wiki/ANSI_escape_code

@vinc vinc marked this pull request as ready for review July 21, 2021 21:25
@vinc vinc merged commit b7eeb25 into master Jul 21, 2021
@vinc vinc deleted the feature/use-csi-for-key-events branch October 4, 2021 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant