Fix terminal keyboard negotiation and cleanup

main
No checks reported

Commit

Markus1mo ago

Preserve modified Enter and layout-aware Alt+Shift shortcuts. Restore keyboard and renderer modes after startup failures. Verify zero-byte retained clearing against a local MQTT broker.

Tests: make test, full race suite, PTY regressions, Darwin compile.