mosaic icon indicating copy to clipboard operation
mosaic copied to clipboard

Add jline3 and expose raw keyboard input somehow

Open JakeWharton opened this issue 5 years ago • 6 comments

JakeWharton avatar Nov 21 '20 05:11 JakeWharton

Probably modifiers, just like Android/Desktop Compose.

JakeWharton avatar Nov 27 '20 05:11 JakeWharton

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.

opatry avatar Jan 11 '22 19:01 opatry

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

JakeWharton avatar Sep 06 '22 19:09 JakeWharton

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

EpicDima avatar Jun 16 '24 23:06 EpicDima

Yeah just saw that earlier. Cool!

JakeWharton avatar Jun 17 '24 00:06 JakeWharton

This version upgrade just landed.

JakeWharton avatar Jun 30 '24 00:06 JakeWharton

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 avatar Aug 19 '24 20:08 JakeWharton

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 avatar Aug 19 '24 20:08 JakeWharton

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

JakeWharton avatar Aug 20 '24 19:08 JakeWharton