alacritty/vte

Read user input

gwenn opened this issue · 6 comments

gwenn commented

Would it be possible to use vte to read user input (keyboard / mouse) in raw mode ?
I am doing experiments here.
And it appears that some key sequences are not reported like:

  • Shift-Tab
  • Alt-Enter
  • Alt-Backspace

Thanks.

It's for generally parsing escapes you get from the application and implement virtual terminal emulator, not for the application side itself, since it's different. It could be improved to handle both sides of the equation, but there're already creates doing so, like crossterm.

gwenn commented

But crossterm is huge.
And termwiz is partially using vtparse for interpreting user input (vtparse ~= vte) but has the same issue.

I would like to replace this mess (which has been around longer than crossterm) without depending on async io.

This is pretty much out-of-scope for this library, however nothing stops from building derivative for client part of terminal apps.

I don't want to have a decoding of kitty/terminfo/all other stuff here.

Like input is more complicated than you might think of it.

It's for generally parsing escapes you get from the application and implement virtual terminal emulator, not for the application side itself, since it's different. It could be improved to handle both sides of the equation, but there're already creates doing so, like crossterm.

This is not entirely true. Most existing libraries like crossterm are pretty bad and VTE is perfectly capable of handling the client side of things too: https://github.com/chrisduerr/sketch/blob/master/Cargo.toml#L8

gwenn commented

@chrisduerr So should I reopen this issue ?

No, it's already possible. If you want something like ansi but for client, that part is out of scope.