[xtmodkeys] step up to 4;2, and define all modifiers #2518

This commit is contained in:
nick black 2022-01-02 20:46:57 -05:00
parent f3f5ca0a3a
commit 6f36efd80a
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
2 changed files with 8 additions and 2 deletions

View File

@ -621,9 +621,15 @@ xtmodkey(inputctx* ictx, int val, int mods){
.id = val,
.evtype = NCTYPE_UNKNOWN,
};
if(mods == 5){
if(mods == 2 || mods == 4 || mods == 6 || mods == 8){
tni.shift = 1;
}
if(mods == 5 || mods == 6 || mods == 7 || mods == 8){
tni.ctrl = 1;
}
if(mods == 3 || mods == 4 || mods == 7 || mods == 8){
tni.alt = 1;
}
load_ncinput(ictx, &tni, 0);
}

View File

@ -492,7 +492,7 @@ init_terminfo_esc(tinfo* ti, const char* name, escape_e idx,
// set modifyFunctionKeys (2) if supported, allowing us to disambiguate
// function keys when used with modifiers. set modifyOtherKeys (4) if
// supported. these ought follow keyboard push and precede kitty keyboard.
#define XTMODKEYS "\x1b[>2;1m\x1b[>4;1m"
#define XTMODKEYS "\x1b[>2;1m\x1b[>4;2m"
// these queries can hopefully uniquely and unquestionably identify the
// terminal to which we are talking. if we already know what we're talking