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:
parent
731b014397
commit
0bf4610c02
1 changed files with 6 additions and 0 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue