Skip to content

fix(tty): preserve navigation keys and bound canvas control output - #637

Merged
wolfy-j merged 3 commits into
mainfrom
fix/tty-navigation-keys
Sep 5, 2026
Merged

fix(tty): preserve navigation keys and bound canvas control output#637
wolfy-j merged 3 commits into
mainfrom
fix/tty-navigation-keys

Conversation

@wolfy-j

@wolfy-j wolfy-j commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Fix navigation keys rendering as private-use Unicode in embedded terminal apps after Kitty negotiation, and prevent canvas tail controls from escaping their placement rectangle and erasing neighboring UI.

Functional keys use their specified CSI encodings, with modifiers and negotiated release events preserved. Key-name normalization is shared across encoders. Canvas writes enforce bounds at the cell boundary and discard control-only output while preserving SGR styles and OSC 8 links. The bounded target is reused for row drawing. The Lua SDK is unchanged.

Validation:

  • 10,912 functional-key combinations, independent decoder checks, and native Bash PTY editing coverage.
  • Canvas regressions cover erase/cursor controls, neighboring cells, styles, links, and Lua row/fill operations.
  • Terminal, Lua TTY/exec, and virtual viewport race tests.
  • Existing CI covers Linux, Windows, lint, and CodeQL.

The small runtime demo uses Bash for interactive editing. The desktop OS and Lineage applications are not included.

Protocol reference: https://sw.kovidgoyal.net/kitty/keyboard-protocol/#functional-key-definitions

@wolfy-j wolfy-j changed the title fix(tty): preserve navigation keys under Kitty negotiation fix(tty): preserve navigation keys and bound canvas control output Sep 5, 2026
@wolfy-j
wolfy-j merged commit f34c851 into main Sep 5, 2026
8 checks passed
@wolfy-j
wolfy-j deleted the fix/tty-navigation-keys branch September 5, 2026 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants