<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pardes.git/src/gui/gui.zig, branch main</title>
<subtitle>Pardes</subtitle>
<id>https://git.0x4200.cafe/pardes.git/atom?h=main</id>
<link rel='self' href='https://git.0x4200.cafe/pardes.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/'/>
<updated>2026-10-01T15:58:23Z</updated>
<entry>
<title>Alt/Option-click is B2 and Super/Cmd-click is B3, sweeps included, as in plan9port: a one-button trackpad can execute and look</title>
<updated>2026-10-01T15:58:23Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-10-01T15:44:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=8eeab5df9c09caafc07c93c2fc3baf6e6700afed'/>
<id>urn:sha1:8eeab5df9c09caafc07c93c2fc3baf6e6700afed</id>
<content type='text'>
The core decides it at the press (mouse.emulateButton) and keeps it to the
release, whatever keys are let go between. Ctrl-click stays a definition,
and a program tracking the mouse still gets the plain click (Alt as its
meta, Super as nothing). The SDL, macOS and web shells now pass Super; the
macOS and web shells pass Alt on a click too. A terminal's mouse report has
no Super bit, so in a terminal only Alt-click is B2.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Shift-Esc always backs out: in every mode and pane it goes to the previous pane, as Esc does from normal, and a raw program never sees it; Ctrl-b alone toggles raw</title>
<updated>2026-10-01T12:47:18Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-10-01T12:43:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=802de4f12f125abc261c58bdb5385f6be3ad469a'/>
<id>urn:sha1:802de4f12f125abc261c58bdb5385f6be3ad469a</id>
<content type='text'>
Shift-Esc switched a terminal in normal or insert mode into raw, so the
one key meant to get out of anything got a script or a person into a
program instead. It is now handled before any mode: an open prompt is
closed, insert mode left, a pending count dropped, and Last runs, the
pane keeping its mode (a raw terminal stays raw). Ctrl-b is the only
switch between raw and normal. The keymap's two chords become one,
back_out; the cheatsheet row, the guide's mode table and the tutor say
so, and the tty and builtins goldens are re-recorded.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>A terminal pane draws the kitty graphics its program places, so yazi's image and PDF previews show</title>
<updated>2026-10-01T03:53:17Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-10-01T03:35:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=28c74918cde4092d964daa847c026ed3de282683'/>
<id>urn:sha1:28c74918cde4092d964daa847c026ed3de282683</id>
<content type='text'>
yazi asks the pane XTVERSION, and ghostty-vt answers "libghostty": yazi
takes it for Ghostty and sends its previews by the kitty graphics protocol
with Unicode placeholders (a=T,U=1, then U+10EEEE cells). ghostty-vt stored
the images, but nothing drew them: the placeholders showed as tofu in the
GUI and as raw codepoints in the tty, in every build since terminal panes
answered queries (vkznsvzs, 2026-07-01). Before that no query was answered
and yazi fell back to chafa's text art.

Each frame, TerminalImages.zig reads the active screen's images and
placements (virtual ones through their placeholder runs, and ones placed on
a cell), cuts each into the cell rows it covers, maps those rows through
the body's own row walk, clips them to the pane, and hands them on as
ImagePlaces with exact geometry (NativePlacement.exact). The GUI draws
them as textures; the tty passes them to an outer terminal with kitty
graphics as one placement per row, its source cropped to whole cells.
Placeholder cells draw no text. Scrolling, a delete, a resize, the
alternate screen and a closed pane all fall out of reading the emulator's
state every frame.

A pane now knows its size in pixels: CSI 14/16/18 t are answered, the
emulator's width_px/height_px follow the shell's cells, and the pty's
winsize carries pixels (host_io.ptyWinsize), so yazi and a nested pardes
size their images right. ghostty-vt's image store is 64 MiB per screen
(its library default, 10 MB, refused a large preview), PNG transmissions
are decoded with stb_image, and RGB images are converted only while shown.

test/yazi_preview.py runs yazi in a hidden window on a PNG and a PDF and
checks the captures, also through a tty pardes nested in the pane.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Over a program that tracks the mouse, B2 and B3 are pardes's execute and look, as in any pane, and Shift sends them to the program as its buttons 2 and 3; B1 and the wheel stay the program's, Shift keeping them pardes's</title>
<updated>2026-10-01T03:12:17Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-09-30T21:39:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=f99806de546c837ab6f2d5b1e3e8accc95e63a7e'/>
<id>urn:sha1:f99806de546c837ab6f2d5b1e3e8accc95e63a7e</id>
<content type='text'>
The Shift that sends B2 or B3 is left out of their reports and of the
drags they hold: it only chose the target. A B2 or B3 sweep of pardes's
moves nothing to the program under 1003.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>The window's F1-F24, Insert, Print Screen, Scroll Lock, Pause and Menu keys reach a terminal's program, which they never did; every key a program gets follows its cursor keys' mode and kitty keyboard flags, pinned for both shells</title>
<updated>2026-10-01T03:12:17Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-09-30T17:29:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=8262f315538b70ab8a123ef1e9346f25b25ec939'/>
<id>urn:sha1:8262f315538b70ab8a123ef1e9346f25b25ec939</id>
<content type='text'>
The keys went through ghostty's encoder already (DECCKM, the kitty flags);
the GUI's native key map simply dropped the function and editing keys it
did not name.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>A paste into a terminal is xterm's paste: bracketed when the program set 2004, and the control bytes a paste could smuggle a command in by, ESC first, become spaces, so no ESC[201~ in the text ends the brackets early</title>
<updated>2026-10-01T03:12:17Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-09-30T17:23:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=505d15e238e4e9c5020a8e567d700bdbf67a8528'/>
<id>urn:sha1:505d15e238e4e9c5020a8e567d700bdbf67a8528</id>
<content type='text'>
Every paste path goes through edit.typeToTty (the GUI's and the tty's
paste, p from a register, the acme chord's paste, a REPL's send), which
now takes ghostty's paste encoder. A 9P write to a terminal's body or
pty/data stays typed input, not a paste. The GUI test shell's stdin now
takes a bracketed paste as one paste, as the tty does, not as keys.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>A program that asked for focus reports (1004) hears CSI I when its pane takes the keyboard and CSI O when it gives it up, to another pane, a tag or another window</title>
<updated>2026-10-01T03:12:17Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-09-30T17:20:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=17c0d06618085de8d0bbf8152750ffa862db0080'/>
<id>urn:sha1:17c0d06618085de8d0bbf8152750ffa862db0080</id>
<content type='text'>
The core has a window-focus event now, from SDL's window focus and from
the tty's own focus reports (vaxis turns 1004 on outside); the detached
wire carries it: version 10. The test shell's ESC]777;mouse;focus;&lt;1|0&gt;
fakes the window's.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>A program that tracks the mouse gets its clicks, drags and moves over its grid, in the format it chose; Shift keeps pardes's select, execute and look, and chrome is never the program's</title>
<updated>2026-10-01T03:12:17Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-09-30T17:12:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=b546b578baadbd8fdd15b42988ad4d66c9c8ff21'/>
<id>urn:sha1:b546b578baadbd8fdd15b42988ad4d66c9c8ff21</id>
<content type='text'>
Presses and releases under 1000, drags with a button down under 1002,
every move once per cell under 1003, X10 presses under 9, in raw terminal
input only. A press the program took keeps its drag and release, reported
clamped to the grid's edge wherever the pointer goes. The press also makes
the pane the active one. docs/tags.md says so.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>A mouse event carries Shift and Alt as well as Ctrl, from SDL and from the tty's input; a program's wheel report carries them as xterm counts them, and Shift keeps the wheel pardes's own scroll</title>
<updated>2026-10-01T03:12:17Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-09-30T17:06:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=3f6733c805d873a7af6a6064ace0cf5916f481da'/>
<id>urn:sha1:3f6733c805d873a7af6a6064ace0cf5916f481da</id>
<content type='text'>
The reports are ghostty's encoder now (shift+4, meta+8, ctrl+16), with the
mode and format ghostty tracks. The detached wire carries the two new
bits: version 9. The test shell's ESC]777;mouse takes an optional fifth
field of modifiers.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>A wheel over a terminal whose program owns it goes to the program: its mouse report when it tracks the mouse, arrow keys on the alternate screen with alternate scroll, so codex, htop and less scroll</title>
<updated>2026-10-01T03:12:17Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-09-30T16:49:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=387d6a39bad76c5eb2f56328f7cf7869a9a10559'/>
<id>urn:sha1:387d6a39bad76c5eb2f56328f7cf7869a9a10559</id>
<content type='text'>
codex 0.158 moved its chat onto the alternate screen with any-event SGR
mouse tracking (1049, 1000/1002/1003/1006, 1007 off); its sign-in screen
keeps 1007 on with tracking off. pardes never forwarded a wheel to a
program, only scrolled ghostty's scrollback, which the alternate screen
does not have, so the wheel did nothing there. A shell on the main screen
still scrolls its scrollback as before.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
