ingest: Define ncurses key maps for ctrl/shift shortcuts

This ensure that sequences like ctrl+up or shift+end work regardless of
the terminal settings. Tested with TMUX and foot.
This commit is contained in:
Aaron Cook 2026-10-15 16:22:29 -05:00
commit 0bf4610c02

View file

@ -53,6 +53,12 @@ ingest_start(bytenuts_t *bytenuts)
ingest.cmd_pg_cur = -1; ingest.cmd_pg_cur = -1;
ingest.xmodem_hist = bstr_history_create(); ingest.xmodem_hist = bstr_history_create();
/* ensure character sequences work in all terminals */
define_key("\033[1;5A", KEY_CUP);
define_key("\033[1;5B", KEY_CDOWN);
define_key("\033[1;2H", KEY_SHOME);
define_key("\033[1;2F", KEY_SEND);
HOME = getenv("HOME"); HOME = getenv("HOME");
if (HOME) { if (HOME) {
int idx = 0; int idx = 0;