From 0bf4610c02ead6abbcf8e5d27954868581d07562 Mon Sep 17 00:00:00 2001 From: Aaron Cook Date: Thu, 15 Oct 2026 16:22:29 -0500 Subject: [PATCH] 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. --- src/ingest.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ingest.c b/src/ingest.c index 3679b2e..e417ee2 100644 --- a/src/ingest.c +++ b/src/ingest.c @@ -53,6 +53,12 @@ ingest_start(bytenuts_t *bytenuts) ingest.cmd_pg_cur = -1; 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"); if (HOME) { int idx = 0;