diff options
| author | sl0p <sl0p@sl0p.foo> | 2026-08-13 22:08:30 +0200 |
|---|---|---|
| committer | sl0p <sl0p@sl0p.foo> | 2026-08-13 22:08:30 +0200 |
| commit | 7521f217a5ed98cef16db5837a72fae32dce9552 (patch) | |
| tree | 396837adb0cd65066d78f32eb3b6a9de7eabf67a /src/json.c | |
| parent | sl0ptty: M0 — libghostty-vt vendored, one pane, compositor, diff renderer (diff) | |
| download | slosh-7521f217a5ed98cef16db5837a72fae32dce9552.tar.gz slosh-7521f217a5ed98cef16db5837a72fae32dce9552.tar.xz slosh-7521f217a5ed98cef16db5837a72fae32dce9552.zip | |
sl0ptty: input decoder + per-pane re-encode
The half libghostty-vt does not do: decode what the outer terminal sends us
into semantic events, then re-encode each event for the target pane against
that pane's own negotiated modes.
Decoder (src/input.c): legacy keys and modifiers, SS3, tilde keys, the kitty
keyboard protocol (CSI u, shifted/base layout sub-params, press/repeat/release,
associated text), SGR mouse incl. drag and wheel, bracketed paste, focus
events, alt-prefix, UTF-8, and partial sequences retained across reads.
Re-encoding (pane_send_key/mouse/paste) drives lib-vt's key and mouse encoders
via setopt_from_terminal, so a pane gets exactly what it negotiated. The mouse
encoder wants surface pixels; we declare a 1x1 pixel cell so cell coordinates
are exact rather than approximated.
The prefix key is handled on decoded events, not bytes, so it cannot be
confused by a byte that merely looks like C-a inside a UTF-8 or escape
sequence.
Tests: 40 table-driven decoder cases (tests/input_test.c) + a live check that
drives the same client into a legacy pane and a kitty/mouse pane and asserts
each receives its own encoding (tests/live_input.py). 59 checks, all green.
Diffstat (limited to 'src/json.c')
0 files changed, 0 insertions, 0 deletions
