gyscos / cursive

A Text User Interface library for the Rust programming language
MIT License
4.26k stars 243 forks source link

[BUG] Shift+Up/Down do not work w/ Termion backend #758

Open hrkfdn opened 1 year ago

hrkfdn commented 1 year ago

Describe the bug Some bindings do not work with Termion, i.e. Shift+Up/Shift+Down. Shift+p for instance works. This is with the Termion backend on Linux using GNOME Terminal. TERM is set to xterm-256color.

Expected behavior A clear and concise description of what you expected to happen.

Environment

Additional context

gyscos commented 1 year ago

Hi, and thanks for the report!

Indeed, it seems the termion backend doesn't currently support shift+arrow (or ctrl+arrow). It doesn't seem to be supported in termion itself.

Termion does return an "unsupported" key code, and we could parse these codes here, but in that case we'd pretty much be doing the backend library's job. I'm not entirely against that, but I slightly prefer the alternatives:

hrkfdn commented 1 year ago

Thanks, I have switched to Crossterm now, seems to work fine :)