From 437c1de9523b6563ae1eb472903ab5ee55967bdc Mon Sep 17 00:00:00 2001 From: nick black Date: Sat, 14 Aug 2021 02:35:21 -0400 Subject: [PATCH] input: handle terminfo's kcbt (back tab) --- src/lib/input.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lib/input.c b/src/lib/input.c index d2b8962f6..0b7a3d6e8 100644 --- a/src/lib/input.c +++ b/src/lib/input.c @@ -145,16 +145,13 @@ input_free_esctrie(esctrie** eptr){ } } +// multiple input escapes might map to the same input static int ncinputlayer_add_input_escape(ncinputlayer* nc, const char* esc, uint32_t special){ if(esc[0] != NCKEY_ESC || strlen(esc) < 2){ // assume ESC prefix + content logerror("Not an escape: %s (0x%x)\n", esc, special); return -1; } - if(!nckey_supppuab_p(special) && special != NCKEY_CSI){ - logerror("Not a supplementary-b PUA char: %u (0x%x)\n", special, special); - return -1; - } esctrie** cur = &nc->inputescapes; do{ //fprintf(stderr, "ADDING: %s (%zu) for %d\n", esc, strlen(esc), special); @@ -634,6 +631,7 @@ prep_special_keys(ncinputlayer* nc){ const char* tinfo; uint32_t key; } keys[] = { + { .tinfo = "kcbt", .key = '\t', }, // FIXME plus shift { .tinfo = "kcub1", .key = NCKEY_LEFT, }, { .tinfo = "kcuf1", .key = NCKEY_RIGHT, }, { .tinfo = "kcuu1", .key = NCKEY_UP, },