diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-25 05:18:36 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-25 05:31:33 -0300 |
| commit | c22b57e13fec318ff4df96fb07b096ea53e31122 (patch) | |
| tree | 98174227327972821a2cd8623fc3a30b0e19b28c /dev/Shell.zig | |
| parent | 61c40ab7cffc64a11cb5e874eec9568ed06ad95b (diff) | |
| download | pardes-c22b57e13fec318ff4df96fb07b096ea53e31122.tar.gz pardes-c22b57e13fec318ff4df96fb07b096ea53e31122.zip | |
tui, gui, test/process/window: Escape is the Escape key at once (walk UI P3 item 3, DESIGN D15, POLISH 16): MEASURED in a pty (.scratch/walkui/P3/esc/measure.py, the Debug tty on a legacy terminal, keys written as a terminal writes them, the body read over 9P after `i x Esc A y`): an Esc in a write of its own was taken at once (`xinitialy`); one that reached pardes glued after the key before it in one read (keys typed faster than read: a burst over a link) waited 50 ms for a sequence's rest, and `A` coming in those 50 ms joined it as Alt-A (`xyinitial`: Escape lost, insert mode kept); 100 ms later it was taken; with the kitty keyboard protocol Escape is `CSI 27 u`, never held; so a user of a legacy terminal (tmux, ssh) lost an Escape typed in a burst, never a lone one; THE CAUSE (dev/tui/tui.zig readInput): the ESC a wait saw more after was carried into the next read whatever that read held; THE FIX: carried so, it is the Escape key unless the next read goes on with a sequence's rest, its introducer (`[`, `O`, `]`, `P`, `_`, `^`, `\`) or another ESC: an ssh packet's cut after an ESC still joins (the test "terminal input split at every byte with a gap" unchanged), the key typed after Escape is its own; the 50 ms a glued ESC waits when nothing follows stays (its trade-off for those cuts); after it the pty measurement takes Escape in all three cases; AND the window's test stdin (dev/gui/gui.zig StdinFeed.pump, the screenshot kit's and the gui cases' keys, S's POLISH 16) held a read's trailing lone ESC as the possible start of its `ESC ]777;` events until the next write, with no timeout, so that write's first key came as Alt on it: a read that ends in a lone ESC ends in the Escape key now, as the tty's reader has a read of one; TESTS FIRST: tui.zig "an ESC that ends a read, a key read after it within the wait, is the Escape key and then that key" (on the base: Alt-A, `expected 27, found 65`), test/process/window.zig "a lone Esc written to its test stdin is the Escape key at once, the key written after it its own" (gui, run with the gui gates); shell-test 1281/1284 (3 skipped), core-test 1063/1233 (170 skipped)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE
Diffstat (limited to 'dev/Shell.zig')
0 files changed, 0 insertions, 0 deletions
