-
Notifications
You must be signed in to change notification settings - Fork 287
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
Ability to customize event source #694
Comments
I think that this PR is trying to achieve that: #407. It will allow someone to just write anything to dev/tty and crossterm would interpret that. Right? |
Thanks for your reply. My SSH server will directly receive and send data from the TCP connection. The rendering work will happen in the client's terminal. So |
Currently, I just implemented |
Hi there, I'd like to add that when you try to create the No TTY is essential in containers, here as OP in remote conns and for automated testing, too... Try this: (echo ahoj | RUST_BACKTRACE=1 setsid cargo run 2>err.log > out.log) let events = EventStream::default(); Please, at least return a result at creation, instead of panic on reading: See how an error to get a tty is silently ignored: let source = source.ok().map(|x| Box::new(x) as Box<dyn EventSource>); Which later leads to panic: self.source.as_ref().expect("reader source not set").waker() Or not to break the API, add a method on Ideally we would be able to create I'm willing to put some work into it if you're interested. |
Hi, I am current making an SSH server. After user logged in, they will get a UI based on
tui
andcrossterm
.However, it seems that crossterm relies on getting input from a specific file descriptor in Unix. That's somehow difficult for me to use, as we are not in a real terminal.
But we do could get user inputs with a format of
[u8]
array, so I am wondering if I can create my own input parser and a custom event source. Currently, crossterm may not have the ability to allow me to do it.So should the custom event source be a feature for crossterm, or I just fork one to modify some code?
The text was updated successfully, but these errors were encountered: