From 542e6677e23e277ce39edb3e96d729e9adca99d0 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 5 Nov 2026 19:29:06 -0300 Subject: split pardes.zig by noun, keys: the keyboard leaves the session for src/keys.zig, free functions on it as mouse.zig is the mouse: handleKey, leaderKey, replayKeys, cycleMode, toggleTty, questionChoices and answerQuestion; their callers name keys (builtins.zig, ninep/ctl.zig, normal.zig, whose own `keys` are the replayed keys, so it imports the file as keyboard; update calls keys.handleKey); comments citing Pardes.handleKey and Pardes.answerQuestion cite keys; tests moved with them, by name: Esc back into a tty leaves its view at the prompt; Del from a key asks which neighbour takes the rows; nothing else asks; raw tty Esc backs out and Shift-Esc is the program's Esc; with ProgramEsc raw tty Escape only leaves at a shell prompt; the Del question shows only once its delay is up: a quick SPC d j never sees it; raw tty Ctrl-B switches to editor mode without sending child input; raw tty forwards Ctrl letters and former global shortcuts to the child; s in a header selects in the header's own text; a pure move, no field touched, a dump and the wire as they were; gates on tui: core-test 960/960, behaviour-test 238/238 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/layout.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/layout.zig') diff --git a/src/layout.zig b/src/layout.zig index 9c600cd7..4a4582b3 100644 --- a/src/layout.zig +++ b/src/layout.zig @@ -90,7 +90,7 @@ pub fn windowLabel(p: *const Pardes, id: usize) ?u8 { /// column's top pane goes on to its tag, as the Up word does. `d` is Del /// on the outlined pane and `c` Collapse, and the mode stays: a Del that /// closes it moves the outline to the pane its rows went to (after the k/j -/// question, when Del asks one; Pardes.answerQuestion). Any other key +/// question, when Del asks one; keys.answerQuestion). Any other key /// changes nothing. pub fn windowKey(p: *Pardes, key: pardes.Key) void { const at = p.window_pick orelse return; -- cgit v1.3