mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
[xtmodkeys] step up to 4;2, and define all modifiers #2518
This commit is contained in:
parent
f3f5ca0a3a
commit
6f36efd80a
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user