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

Handle Ctrl-Shift-u to input unicode #70

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

snaggen
Copy link

@snaggen snaggen commented Jan 19, 2024

I have created a small state machine in terminal_box. By pressing Ctrl-shift-u, the input gets in to Unicode state, after that, all ascii hex digits are stored in a Vec. Then on any non-ascii hex digit or modifier change, the stored digits are converted to the unicode character they represent and sent to the terminal.

@snaggen snaggen force-pushed the unicode_input branch 2 times, most recently from ec603c3 to 2870b21 Compare February 9, 2024 08:05
@snaggen
Copy link
Author

snaggen commented Feb 9, 2024

I have updated this to master, it is now much less intrusive. The only thing for this feature would be to show some special unicode indication at the cursor (possibly 'Ⓤ' ) when you are in unicode input mode. However, the cursor handling still looks quite limited, so I'm not sure how to do this. Now, all terminals doesn't have this, so I think it is still usable without.
Ctrl-Shift-u is hardcoded, but this is the standard used for unicode input under linux, so I don't think that is a problem.

@snaggen
Copy link
Author

snaggen commented Feb 9, 2024

Maybe this should be handled higher up in the input stack though, but I'm not sure that is possible to do in a good way.

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.

None yet

1 participant