-
Notifications
You must be signed in to change notification settings - Fork 341
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
The first terminal event is ignored after using stdin
#1055
Comments
This was referenced Mar 9, 2023
This behaviour seems to be the same as tokio. |
The behaviour seems to known limitation. |
eatradish
added a commit
to AOSC-Dev/oma
that referenced
this issue
Sep 24, 2024
`async-std` and `tokio` stdin use `spawn_blocking` to handle stdin, That is, `stdin` task does not end after the timeout, so no input can be processed after opening the TUI. This fix came from upstream: https://github.com/dalance/termbg/tree/non_blocking_stdin, but it was not adopted by upstream because it doesn't compile under Windows, but fortunately oma has no plans to support Windows for the time being. ref: - tokio-rs/tokio#5535 - async-rs/async-std#1055 - zellij-org/zellij#538 - https://github.com/zellij-org/zellij/blob/3569daf7c9cacc1dbbec6a3813079130b4c0683c/zellij-client/src/os_input_output.rs#L270
eatradish
added a commit
to AOSC-Dev/oma
that referenced
this issue
Sep 24, 2024
`async-std` and `tokio` stdin use `spawn_blocking` to handle stdin, That is, `stdin` task does not end after the timeout, so no input can be processed after opening the TUI. This fix came from upstream: https://github.com/dalance/termbg/tree/non_blocking_stdin, but it was not adopted by upstream because it doesn't compile under Windows, but fortunately oma has no plans to support Windows for the time being. ref: - tokio-rs/tokio#5535 - async-rs/async-std#1055 - zellij-org/zellij#538 - https://github.com/zellij-org/zellij/blob/3569daf7c9cacc1dbbec6a3813079130b4c0683c/zellij-client/src/os_input_output.rs#L270
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I want to use
async_std::io::std
and terminal event after it.But the first event seems to be ignored.
The procedure of reproduce is below:
dbg!
message is shownThe expected result is that the first key pressing is shown.
Actually the first key pressing is ignored, and the second key pressing is shown.
If
let buf = ...
code block is commented out, the first key pressing is shown.The text was updated successfully, but these errors were encountered: