mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 15:02:32 +00:00
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:
parent
b42362e1d5
commit
f7e7d6aa41
1 changed files with 6 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue