Skip to content

feat: add an input event log to recordings (#118) - #158

Merged
TMHSDigital merged 1 commit into
mainfrom
feat/input-events-118
Oct 25, 2026
Merged

TMHSDigital merged 1 commit into
mainfrom
feat/input-events-118

Conversation

@TMHSDigital

Copy link
Copy Markdown
Owner

Closes #118.

What: start_recording { events: true } writes <recording>.events.jsonl beside the video, and the new read_events tool returns slices of it:

  • mouse down/up per button, wheel (vertical/horizontal notches), and move sampled every 33 ms
  • key presses
  • each event has t (seconds on the video's clock), x/y in video pixels, and inFrame

This is the data auto-zoom toward clicks, click highlights, and keystroke overlays (ROADMAP Phase 5) need. It also lets an agent jump to "the frame after the 3rd click".

How: a small C# low-level hook helper (compiled through PowerShell, ready in about 1 s) starts before ffmpeg and appends raw lines stamped with GetSystemTimePreciseAsFileTime. When ffmpeg exits for any reason (stop, maxDurationSec, crash, shutdown), the helper is stopped and the log is converted using gdigrab's reported first-frame wall-clock time (start: in the input banner). stopSession waits for the conversion, so stop_recording reports the finished log. The helper also exits on its own if the server dies.

Privacy: keys are never logged as text.

  • keys: "masked" (default): only that a key went down.
  • keys: "shortcuts": also names chords held with Ctrl, Alt, or Win (Ctrl+S, Alt+Tab). Plain typing, Shift+letter, and AltGr characters stay masked.
  • There is deliberately no full mode: a system-wide record of typed text is a keylogger, and overlays don't need it.

Opt-in per recording. The log is gitignored (*.events.jsonl) and covered in the threat model.

Tests

  • Unit: start-time parsing, conversion and coordinate mapping, torn lines, selection, the helper script's parameter handling, CLIXML error cleanup, captureFrame.
  • Live: records a window that turns black on mouse down and sends one atomic absolute-position click; Ctrl+S is sent only if the test window has focus. Checks the logged click position, the chord, and that the black frame lands 26–54 ms after the logged click over 3 runs (1–1.5 frames at 30 fps, including the app's repaint).

Bumps to 0.28.0.

🤖 Generated with Claude Code

start_recording events: true logs clicks, scroll, sampled cursor
positions, and key presses to <recording>.events.jsonl, timed to the
video and in video pixels; read_events returns slices. Keys are masked by
default, with an opt-in for Ctrl/Alt/Win shortcuts; typed text is never
logged.

Closes #118

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Oct 25, 2026
@TMHSDigital
TMHSDigital merged commit 80d5fb8 into main Oct 25, 2026
8 checks passed
@TMHSDigital
TMHSDigital deleted the feat/input-events-118 branch October 25, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Input event log saved alongside each recording (clicks, cursor, keys) on the video clock

1 participant