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

Add jline3 and expose raw keyboard input somehow #10

Closed
JakeWharton opened this issue Nov 21, 2020 · 9 comments · Fixed by #442
Closed

Add jline3 and expose raw keyboard input somehow #10

JakeWharton opened this issue Nov 21, 2020 · 9 comments · Fixed by #442
Labels
enhancement New feature or request mosaic/runtime

Comments

@JakeWharton
Copy link
Owner

No description provided.

@JakeWharton
Copy link
Owner Author

Probably modifiers, just like Android/Desktop Compose.

@JakeWharton JakeWharton added mosaic/runtime enhancement New feature or request labels May 5, 2021
@opatry
Copy link

opatry commented Jan 11, 2022

You mean, having Modifier.onKeyEvent(), right?
If so, I guess KeyEvent would be different from the Android/Desktop one which is in the ui package.

@JakeWharton
Copy link
Owner Author

It's probably not that different in shape, but yes we are not reusing anything from Compose UI / Foundation.

@EpicDima
Copy link
Contributor

I think we can use mordant to handle the user input that was added in this pull request. It remains only to wait for the official new version to try

@JakeWharton
Copy link
Owner Author

Yeah just saw that earlier. Cool!

@JakeWharton
Copy link
Owner Author

This version upgrade just landed.

@JakeWharton
Copy link
Owner Author

Did most of this today in the keys branch. Will try to finish it tonight.

Probably need to restore MosaicScope to add an exitApplication function similar to what Compose UI for Desktop does. I'm also unsure what to do about Ctrl+C handling. It might be worth having automatic handling of that with some kind of opt-out.

@JakeWharton
Copy link
Owner Author

Also I'm about to unconditionally put the terminal in raw mode. Is there any reason to not do that? I see a few other frameworks unconditionally do it as well.

@JakeWharton
Copy link
Owner Author

For ctrl+c, if no one handles it in a modifier, we'll exit. Otherwise, you're on your own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mosaic/runtime
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants