feat(tui): query Kitty keyboard protocol support before enabling

- Query terminal with CSI ? u before enabling Kitty protocol
- Only enable protocol if terminal responds (100ms timeout)
- Mode-aware key parsing: when Kitty active, interpret legacy
  sequences as custom terminal mappings (e.g. \x1b\r = shift+enter)
- Add Terminal Setup section to README with Ghostty/wezterm config

fixes #439
This commit is contained in:
Mario Zechner 2026-01-05 22:52:13 +01:00
parent 0b9e3ada0c
commit c5d54a8413
5 changed files with 186 additions and 18 deletions

View file

@ -55,6 +55,11 @@ export class VirtualTerminal implements Terminal {
return this._rows;
}
get kittyProtocolActive(): boolean {
// Virtual terminal always reports Kitty protocol as active for testing
return true;
}
moveBy(lines: number): void {
if (lines > 0) {
// Move down