-
Notifications
You must be signed in to change notification settings - Fork 284
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
"Pause" tui with crossterm to open dialoguer editor #618
Comments
Hi, This should be possible by coordination between the two threads via channels, or using thread::park (on the input thread), if you can share your code I might be able to to take a look You can checkout a very similar issue #505 Also usually disabling raw mode is needed but not for the input but for the correct rendering of the application |
Awesome - thanks for the quick response @sigmaSd . I will have a look at the issue you mentioned and at |
@sigmaSd I got it to work. I just realized that I used |
Hey, hopefully I'm not abusing any good will here, but I was able to get this working perfectly by parking threads (thank you!), but when the child process terminates, I come back to an empty terminal (I actually see my compiler warnings from cargo run) that never renders again, despite the loop unparking fine and responding to input events. Is it possible I'm missing something I need to be doing with stdio or similar? EDIT: Okay, for the sake of anyone coming after me, the issue was that after the child process completes, we're back on the main screen. You need to go back to the alternate screen, if that's where you have your app running. |
Hey folks,
I am not quite sure, if this is the right place to ask a question like this, so feel free to point me into another direction ;)
I am building a small tui+crossterm application and have two threads - one for rendering and one for input polling.
However I want to spawn a dialoguer editor to allow the user to create some input. However only every other keypress is being registered by the editor. I assume that this is happening because crossterm captures these input events?
I tried to manually pause/resume the input polling thread by sending an
mpsc
-message on another channel, however this didn't work at all. I am also not quite sure which steps would be required, to make everything work - I assume I would also have to disable raw mode again?Any advice on how I could achieve this, would be super helpful (I am pretty new to rust in general). Thanks in advance!
The text was updated successfully, but these errors were encountered: