mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-16 00:13:00 +00:00
input: handle terminfo's kcbt (back tab)
This commit is contained in:
parent
eae2295a5b
commit
437c1de952
@ -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, },
|
||||
|
Loading…
Reference in New Issue
Block a user