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:
@@ -418,6 +418,12 @@ export function matchesKey(data: string, keyId: KeyId): boolean {
|
|||||||
return matchesKittySequence(data, codepoint, MODIFIERS.shift + MODIFIERS.ctrl);
|
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) {
|
if (modifier !== 0) {
|
||||||
return matchesKittySequence(data, codepoint, modifier);
|
return matchesKittySequence(data, codepoint, modifier);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user