From 32d3ec7ea8bda6afc8614a100dfdc7421ecf76be Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 3 Nov 2026 12:57:24 -0300 Subject: fs: kbdin and mousein at the root, rio's and devmouse's (windows/rio/xfid.c:515, kernel/devices/mouse/devmouse.c:445): each rune written to kbdin is a key typed at the pane with the keyboard (control runes Ctrl and a letter but Plan 9's keys: \n Enter, \t Tab, \b Backspace, 0x7f Delete, 0x1b Esc, keyboard.h's private-use runes for the arrows, Home, End, Page Up and Down, Insert, F1-F12), a mousein line `m col row buttons` the mouse as it now is in cells (1 left, 2 middle, 4 right, 8 and 16 a wheel notch), what changed released, moved or pressed; each done before the write is answered, so a script's next read sees it with no sleep; the held buttons are core state, which a replica replays; test/fs.py's keys_and_mouse types, finds the word on /screen and right-clicks it, the first e2e case written through the files alone Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/pardes.zig | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/pardes.zig') diff --git a/src/pardes.zig b/src/pardes.zig index edab4a58..fb3dc36f 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -4464,6 +4464,10 @@ pub const Pardes = struct { /// Zerox's groups of panes on one buffer (File.syncTwins), and the id /// the next takes. twin_groups: std.ArrayList(panes.File.TwinGroup) = .empty, + /// The buttons held as the 9P mousein file last said (Plan 9's bits: + /// 1 left, 2 middle, 4 right): its next line presses and releases + /// what changed. + mousein_buttons: u8 = 0, next_twin: u32 = 1, jumps: [MAX_JUMPS]Loc = undefined, njumps: usize = 0, -- cgit v1.3