cursive icon indicating copy to clipboard operation
cursive copied to clipboard

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

Open hrkfdn opened this issue 10 months ago • 2 comments

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

  • Debian 12.1 with Linux 6.4.0
  • GNOME Terminal 3.46.8 using VTE 0.70.6 +BIDI +GNUTLS +ICU +SYSTEMD
  • Backend used: termion
  • Current locale: en_US.UTF-8
  • Cursive version: 0.20.0

Additional context

  • https://github.com/hrkfdn/ncspot/issues/1283

hrkfdn avatar Sep 23 '23 19:09 hrkfdn

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:

  • Properly report these events in termion itself, so we could support it in cursive.
  • Use another backend that supports these events, like crossterm.

gyscos avatar Sep 29 '23 15:09 gyscos

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

hrkfdn avatar Sep 30 '23 10:09 hrkfdn