fix(tui): add legacy terminal support for shift+letter shortcuts

In legacy terminals, Shift+P produces uppercase 'P' instead of
Kitty protocol sequences. Add fallback to check uppercase letters
for shift+letter combinations.
This commit is contained in:
Helmut Januschka 2026-01-03 23:36:59 +01:00
parent b42362e1d5
commit f7e7d6aa41

View file

@ -418,6 +418,12 @@ export function matchesKey(data: string, keyId: KeyId): boolean {
return matchesKittySequence(data, codepoint, MODIFIERS.shift + MODIFIERS.ctrl);
}
if (shift && !ctrl && !alt) {
// Legacy: shift+letter produces uppercase
if (data === key.toUpperCase()) return true;
return matchesKittySequence(data, codepoint, MODIFIERS.shift);
}
if (modifier !== 0) {
return matchesKittySequence(data, codepoint, modifier);
}