Log key presses that reach the window past the typing budget (TMUX-266) #61
Loading…
Reference in a new issue
No description provided.
Delete branch "att-key-arrival"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Typing on nelsonpc is choppy (TMUX-266, SES-337). tmux's key trace shows its keyboard hook seeing each press on time, while the key reaches tmux from at-terminal 100-1260 ms later; at-tmux's new console-write alarm found no slow writes, so the hold-up is before or inside at-terminal.
Added: the message hook (
at_terminal::handle_message) compares each WM_KEYDOWN'sMSG::time(when Windows says the press happened) with the tick it's taken from the queue, and notes how long the window's thread had taken no message before it (rio-window/.../at_terminal/key_arrival.rs). Presses past the typing budget's 25 ms are counted, andat-terminal.loggetskeys reached the window late count= worst_ms= worst_idle_ms=at most once a second, polled as frames are drawn. A worst much larger than its idle time was held before the window's queue (Windows or another program's keyboard hook); one about as large waited for the window's own thread.Changed:
at_terminal/mod.rs(the hook calls it),platform/windows.rs(late_keys()),atlog.rs(the line, and its place in the fixed-words test),router/mod.rs(polls it fromFrameClock::drawn). Nothing else; Windows only.Tests:
key_arrival's two unit tests and atlog's tests pass (cargo test -j 2);cargo fmt --checkis clean. ci-check not run here: on this PC it would rebuild every dependency from scratch while Nelson types (the per-worktree cache fault found in this session); the PR's CI runs it.🤖 Generated with Claude Code
merge-queue stopped this at
8687d55: CI failed: Suite default / check-fetches (pull_request), Suite default / check-logs (pull_request), Suite default / check-rules (pull_request), Suite default / reused-checks (pull_request), Suite def…. Push a fix. A failure fixed on main lands once thequeuelabel is removed and added again: the queue merges main in and CI runs on the new head.CI freeze (SES-339). The cause of the choppy typing is found (strip-owner's pane listing, TMUX-266), so this instrument isn't needed now; branch att-key-arrival kept for the thaw if stage 3 still needs measuring.
Pull request closed