kbdfs: consult also escaped scancode table when decoding runes (thanks aap)

When at the task of decomposing a rune into its
"button" and "rune", also consider the keyboard
map table with the escaped scancodes.

This fixes Shift + left/right combinations in
drawterm.
This commit is contained in:
cinap_lenrek 2024-08-28 18:30:28 +00:00
parent 09d69e04b9
commit b061a21bfa

View file

@ -552,10 +552,15 @@ Nextmsg:
if(kbtabs[Lnone][i] == k.r || kbtabs[Lshift][i] == k.r || (i >= 16 && kbtabs[Lctl][i] == k.r)){
/* assign button from kbtab */
k.b = kbtabs[Lnone][i];
/* handle ^X forms */
if(k.r == kbtabs[Lnone][i] && kbtabs[Lctl][i] && !a->shift && !a->altgr && a->ctl)
k.r = kbtabs[Lctl][i];
break;
} else if(kbtabs[Lesc1][i] == k.r || kbtabs[Lshiftesc1][i] == k.r){
/* check escaped scancodes too */
k.b = kbtabs[Lesc1][i];
break;
}
}
/* button unknown to kbtab, use rune if no modifier keys are active */