Skip to content

feat(terminal): reliable input transport and sticky modifier keys#41

Open
Seryta wants to merge 1 commit into
librae8226:masterfrom
Seryta:feat/reliable-input-and-termux-keys
Open

feat(terminal): reliable input transport and sticky modifier keys#41
Seryta wants to merge 1 commit into
librae8226:masterfrom
Seryta:feat/reliable-input-and-termux-keys

Conversation

@Seryta

@Seryta Seryta commented May 28, 2026

Copy link
Copy Markdown
Contributor

Frame terminal input as {type:'i', epoch, seq, data}. The client queues unacked frames and replays them on reconnect via a binary hello/ack handshake; the server dedups by (epoch, seq), so a flaky connection can no longer drop or duplicate keystrokes. Raw (non-framed) input stays backward-compatible.

Add Termux-style sticky Ctrl/Alt toolbar keys (tap to arm, tap again to lock) so any key on the soft keyboard composes a Ctrl/Alt sequence (e.g. Alt+Enter sends ESC+CR for a newline). All input paths funnel through one send chokepoint so modifiers apply uniformly.

What does this PR do?

Makes mobile terminal input reliable on flaky networks (no dropped or duplicated keystrokes) and lets you compose Ctrl/Alt combos with the regular soft keyboard via sticky modifier keys.

How it was tested

  • Reliable transport: ran the server + tmux in a container and drove it with a WebSocket client — a frame resent 3x under simulated reconnect is written to the PTY exactly once, and every frame (including duplicates) is acked. tsc + vite build pass.
  • Sticky keys: verified in-browser on Android — tapping Ctrl then a letter sends the control byte; locked state composes repeated combos.

Checklist

  • Tested manually in browser (affected user flow verified)
  • No speculative features added beyond the stated goal
  • NORTH-STAR.md principles not violated
  • Commit message follows standard (type(scope): subject)
  • .env not committed

@Seryta Seryta changed the title feat(terminal): reliable input transport and sticky modifier keys WIP: feat(terminal): reliable input transport and sticky modifier keys May 28, 2026
@Seryta Seryta force-pushed the feat/reliable-input-and-termux-keys branch from 56d414d to b548e9b Compare May 28, 2026 02:25
@Seryta Seryta changed the title WIP: feat(terminal): reliable input transport and sticky modifier keys feat(terminal): reliable input transport and sticky modifier keys May 28, 2026
@Seryta Seryta force-pushed the feat/reliable-input-and-termux-keys branch 2 times, most recently from 4966c4e to fb11815 Compare May 28, 2026 06:30
@Seryta Seryta marked this pull request as draft May 28, 2026 06:36
@Seryta Seryta force-pushed the feat/reliable-input-and-termux-keys branch 2 times, most recently from c7a13a2 to 9a2ce45 Compare May 28, 2026 07:08
Frame terminal input as {type:'i', epoch, seq, data}. The client queues
unacked frames and replays them on reconnect via a binary hello/ack
handshake; the server dedups by (epoch, seq), so a flaky connection can
no longer drop or duplicate keystrokes. Raw (non-framed) input stays
backward-compatible.

Add Termux-style sticky Ctrl/Alt toolbar keys (tap to arm, tap again to
lock) so any key on the soft keyboard composes a Ctrl/Alt sequence
(e.g. Alt+Enter -> ESC+CR for a newline). All input paths funnel through
one send chokepoint so modifiers apply uniformly.
@Seryta Seryta force-pushed the feat/reliable-input-and-termux-keys branch from 9a2ce45 to cf1c846 Compare May 28, 2026 07:17
@Seryta Seryta marked this pull request as ready for review May 28, 2026 07:19
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.

1 participant