Keyboard and mouse action logs for game and computer-use agents
What recent papers record about keys, mouse and gamepad input, how they time it against video, and what to require when you buy or audit action logs.
Runtime · 21 November 2026 · 12 min read
A gameplay or desktop recording has two halves. Video shows what the person saw. The action log says what they pressed, moved and held, and when. For game agents, computer-use agents and world models, the log is the part the model learns to act from, and its quality sets a ceiling on what the model can learn about control.
Papers from 2025 and 2026 now give enough detail to say what a good log contains. They also disagree on which frame an action belongs to, because the answer depends on what you train. This post covers what they record, how they turn input into training targets, and what a data lead should check before accepting a delivery.
We covered how our recorder puts frames and input on one clock in How we keep gameplay actions in step with the video. This post is about the log itself: its fields, its units and its timing.
What recent systems record
The newest game agents keep input close to its raw form and choose the model's action format later.
Gamer (Luo et al., 2026) observes the screen every 200 ms but acts at about 30 Hz. Each 200 ms step carries six blocks of about 33 ms, each listing the keys and mouse buttons held during that block, while mouse movement and scroll are summed over the whole step. Button timing is kept six times finer than mouse motion. From about 11,000 hours of raw recording the authors kept about 1,000 hours for instruction annotation, rejecting duplicated sessions, discontinuous frames, out-of-bounds coordinates and recordings whose video and action timestamps could not be aligned. They kept held inputs and task-related waiting.
Player-1 (Ouyang et al., 2026) converts several corpora, including D2E and VPT, into one grammar on a 200 ms grid: 295,097 turns across 172 games, or about 16.4 hours of sampled control. Turn counts and video hours are different denominators. Key presses under 100 ms become taps and longer ones holds; mouse presses up to 300 ms become clicks. The grammar allows several keys and mouse operations in one turn, and during reinforcement learning the share of validation turns using composite actions rose from 64.7% to 93.2%. Models use simultaneous input when the format allows it.
Open-P2P (Yue et al., 2026) trains on more than 8,300 hours of human play, about 600 million image and action pairs. Each action is eight tokens: four keys, two mouse axes and two mouse buttons. QA flags a video for human review when one key is held for more than 60% of frames or more than six keys are down at once.
D2E (Choi et al., 2025) collected 335.6 hours of human demonstrations across 31 games. Its tokenizer keeps event type, time and payload: a virtual key code with press or release, signed mouse X and Y with button flags, and wheel data when present, with 10 ms timestamp resolution.
For computer use, CUA-Suite (Jian et al., 2026) logs clicks, drags, scrolls and keystrokes with millisecond precision across about 10,000 tasks in 87 applications, roughly 55 hours at 30 fps. Work2Skill (Huang et al., 2026) pairs 350 human desktop demonstrations with input events and accessibility targets.
Keys and buttons: keep edges and held state
A key can go down and come back up between two video frames. A player can hold a movement key while clicking and turning. A log that stores only the state at each frame loses the short tap. A log that stores one action class per step loses the chord.
The safer format is edges: one row when a key goes down, one when it comes up, each with its own time. From edges you can derive held state at any instant, taps, holds and chords. Gamer, Player-1 and Open-P2P each build a different model format from the same kinds of signal. A buyer who receives edges can change the format later. A buyer who receives one vendor's tokens cannot.
Edges need two more things. First, the held state at the start of a file, so a later release has something to match. Second, a clear rule for the end of a file, so a reset written at a segment boundary is not mistaken for the player letting go.
Evaluate per key. Pixels to Keys (Pillai et al., 2026) trains an inverse model at 20 Hz to predict W, A, S, D and Space. Adding optical flow raised F1 for the rare Space key from 0.502 to 0.728 on Trackmania, while W stayed at 0.921 and 0.920. An average over keys would have hidden the change.
Mouse: say which number you mean
A column called mouse_x can mean cursor position on the desktop, raw counts from the device, displacement accumulated from a clip origin, or a change in camera angle. Recent datasets use all four.
- EgoCS-400K (Guo et al., 2026) builds over 10,000 hours of Counter-Strike video from match demos. Its mouse fields are per-tick changes in pitch and yaw, which the authors note are not hardware counts, so sensitivity and raw input cannot be recovered.
- GameFactory (Yu et al., 2025) encodes mouse control as accumulated offset from the game-region center relative to the clip start.
- VPT (Baker et al., 2022) records relative movement, and the same movement turns the camera in play but moves a cursor in the inventory.
- Player-1 applies different conversion factors to merge sources: 0.66 for D2E and 2 for VPT.
Every mouse axis needs a unit, an origin, a sign convention and the interaction mode it applies to. For games that lock the pointer for camera control, raw relative counts are what the game reads, and they are the field to ask for. For computer-use grounding you also need cursor position in pixels and the transform from screen coordinates into the cropped, resized video.
Sampling rate matters. A11y-CUA (Gubbi Mohanbabu et al., 2026) throttles mouse-move events to about 2 Hz and synthesizes a drag when a held button moves at least six pixels. That yields clean semantic drags but cannot reconstruct a fast aiming motion.
Gamepads
NitroGen (Magne et al., 2026) recovers gamepad actions from public videos with on-screen input overlays: about 40,000 hours kept from 71,000, across more than 1,000 games. Sticks are parsed on an 11 by 11 grid and buttons as on or off. Against directly logged controls in six games, button accuracy averaged 0.96 and stick R squared 0.84. The authors note that overlays add delay but do not measure it.
Directly logged controller state adds native trigger and stick ranges and no unknown overlay lag. If a gamepad is polled, ask for the poll interval and assume a press shorter than one interval can be missed.
Which frame an action belongs to
Here papers disagree, for good reasons.
For a policy that predicts the next click, an image taken at the moment of the click leaks the answer: the cursor is already on the button. OpenCUA (Wang et al., 2025) goes back to the start of the mouse movement before a click and searches backward for the last visually distinct frame. CUA-Suite takes the keyframe at the midpoint between consecutive actions. PC Tracker, the recorder behind PC Agent (He et al., 2024), keeps a cached screenshot about 100 ms before the action. None shows its rule is optimal.
For an inverse model that labels actions from video, the opposite holds: a key press often has no visible effect at the instant it happens. D2E measured this. With no future frames, its inverse model's horizontal mouse correlation was 0.108 and keyboard accuracy 0.386. With 100 ms of future context they rose to 0.796 and 0.730, and at 150 ms to 0.891 and 0.767, with little change by 200 ms. At 50 ms mouse correlation was already 0.803 while keyboard accuracy was only 0.492, so keys and mouse do not need the same offset.
A single label stamped onto the nearest frame cannot serve both needs. Two joinable timelines can: original input times and original frame times, from which you derive a pre-action observation for policy training and a post-action window for inverse modeling. Each frame row should carry its real presentation time. Index divided by nominal fps fails as soon as the video has variable frame rate or repeated frames.
Turning events into training targets
Every model in these papers compresses raw input before training, and that is where most information is lost.
OpenCUA reduces mouse motion to start and end points, merges same-direction scrolls, merges key presses into typed text and combines modifiers into hotkeys. PC Tracker shows the cost: in one example, nine physical operations including a correction become one typed string. For a GUI planner the string is enough. For a model that should learn to fix a typo or imitate a player's aim, the intermediate events are the target.
Common names help across datasets. OS-ATLAS (Wu et al., 2024) merged equivalent actions such as tap and click, reducing 17 classes to ten, and removing that step hurt out-of-domain performance.
Ask for the transform itself: bin edges, tap and hold thresholds, ordering of simultaneous events, normalization, clipping, maximum concurrent inputs and chunk length. Then regenerate the targets from the raw log and count what was clipped, dropped or collapsed.
Idle time and missing evidence
Removing no-op stretches changes what a model learns. VPT found that tolerating three null frames worked slightly better than one or 21. NitroGen kept only chunks where at least half the steps had an action, which retained 55% of its data. Gamer kept task-related waits.
These rules use different units. Three null ticks at VPT's 20 Hz is 150 ms; NitroGen measures density over a chunk. A rule that works in one corpus is not evidence that it preserves meaningful waiting in another.
A held accelerator, a loading screen and a broken input hook can all produce long stretches with no new events. Only the first two are behavior. A delivery should label true inactivity, held controls, waiting, focus lost, input blocked and capture loss separately.
What the evidence does and does not show
The evidence that logs add value beyond video is real but thin. In Work2Skill's ablation on 64 tasks, full evidence scored 85.27. Removing indexed images, UI annotations or key logs each cost 5.02 to 10.63 points and 14.06 to 21.88 points of success rate. The key-log condition also removed click highlights drawn on the images, so the log's own effect is not isolated.
Inferred labels are not a free substitute. Open-P2P pretrained on about ten times as much video labeled by its inverse model. Test loss fell, but online gains were incremental: 38 against 38.1 on Hovercraft, where lower is better, and 24 against 26.5 on Simple-FPS, where higher is better, compared with human labels alone. Video2GUI (Xiong et al., 2026) infers GUI actions from tutorial videos and grounds each one by searching 0.5 seconds either side of the estimated frame. That is a search window, not a measured timing error.
Open questions:
- How much physical timing error training tolerates. No paper here injects measured clock offset or drift into otherwise identical recordings and trains at several shifts.
- How far before an action a policy should look. PC Tracker, OpenCUA and CUA-Suite use different rules and have not been compared on the same raw traces.
- Observation rate versus history. Pixels to Keys found no gain from 16 frames over five, while Gamer observes at 5 Hz and acts at 30 Hz.
Scores also use different tolerances: NitroGen reports frame-wise button accuracy, D2E 50 ms bins, CUA-Suite 20 and 50 pixel radii. A frame-wise score can look high simply because most buttons are inactive most of the time.
A checklist for buying or auditing action logs
Set numeric limits against your own task and capture setup. A published model's lookahead or drag threshold is not a recorder tolerance.
- Raw edges. Down and up rows with their own timestamps, held state at the start of each file and a defined end reset. Test taps shorter than a frame, modifier chords and keys held across a segment boundary. Count orphan releases and double presses.
- Two joinable timelines. One row per encoded frame with its presentation time and, where available, the image's capture time. One row per input event with a sequence number. Decode every segment and match rows to decoded frames.
- A declared frame assignment rule: observation before the action, controls during the next interval, or resulting image. Rebuild a few examples from raw rows.
- Mouse units for each axis: device counts, OS deltas, absolute coordinates or camera angle, with origin, sign and scroll unit. Plot sample clicks onto decoded frames, including a moved window and a second monitor.
- Controller state at native range, with dead zone policy and poll interval. Test short pulses, stick extremes and disconnects.
- A timing calibration separate from file consistency. A shared clock proves rows agree with each other, not with physical input. Record a known sequence in a test app with a visible marker and report median, p95 and maximum delay, misses and drift.
- An auditable tokenizer, so you can regenerate targets and count what was lost.
- Separate masks for idle and missing data. Sample the longest masked spans by hand.
- Provenance per field: logged by the OS or engine, polled, reconstructed, inferred from video or overlays, or annotated. Report hours per source.
- Splits and rights. Group windows by original recording, and by match when several views show one event, before splitting. Check consent and license terms for video, audio and input.
Where Runtime fits
Runtime Recorder writes the action log alongside the video as people play, so the input arrives in the form this post argues for: presses and releases, raw mouse movement and gamepad state, on one clock with the frames. The clock and frame rows are covered in our earlier post, and the gameplay data page describes what each recording contains.
References
- Baker, B. et al. Video PreTraining (VPT): Learning to Act by Watching Unlabeled Online Videos. 2022. arxiv.org/abs/2206.11795
- Choi, S. et al. D2E: Scaling Vision-Action Pretraining on Desktop Data for Transfer to Embodied AI. 2025. arxiv.org/abs/2510.05684
- Gubbi Mohanbabu, A. et al. A11y-CUA Dataset: Characterizing the Accessibility Gap in Computer Use Agents. 2026. arxiv.org/abs/2602.09310
- Guo, R. et al. EgoCS-400K: An Egocentric Gameplay Dataset for World Models. 2026. arxiv.org/abs/2606.18180
- He, Y. et al. PC Agent: While You Sleep, AI Works, A Cognitive Journey into Digital World. 2024. arxiv.org/abs/2412.17589
- Huang, Y. et al. Work2Skill: Capturing Human GUI Experience for Reusable Agent Skill Induction. 2026. arxiv.org/abs/2610.12984
- Jian, X. et al. CUA-Suite: Massive Human-annotated Video Demonstrations for Computer-Use Agents. 2026. arxiv.org/abs/2603.24440
- Luo, R. et al. Gamer: A Generalist Vision-Language-Action Foundation Model for Long-Horizon Real-Time Game Agent. 2026. arxiv.org/abs/2611.18397
- Magne, L. et al. NitroGen: An Open Foundation Model for Generalist Gaming Agents. 2026. arxiv.org/abs/2601.02427
- Ouyang, M. et al. Player-1: Learning to Play from Synthetic Experience. 2026. arxiv.org/abs/2610.20584
- Pillai, A. et al. Pixels to Keys: Exploring Spatial and Motion Cues in Gameplay Inverse Dynamics. 2026. arxiv.org/abs/2609.37907
- Wang, X. et al. OpenCUA: Open Foundations for Computer-Use Agents. 2025. arxiv.org/abs/2508.09123
- Wu, Z. et al. OS-ATLAS: A Foundation Action Model for Generalist GUI Agents. 2024. arxiv.org/abs/2410.23218
- Xiong, W. et al. Video2GUI: Synthesizing Large-Scale Interaction Trajectories for Generalized GUI Agent Pretraining. 2026. arxiv.org/abs/2605.14747
- Yu, J. et al. GameFactory: Creating New Games with Generative Interactive Videos. 2025. arxiv.org/abs/2501.08325
- Yue, Y. et al. Scaling Behavior Cloning Improves Causal Reasoning: An Open Model for Real-Time Video Game Playing. 2026. arxiv.org/abs/2601.04575
More from the blog
21 November 2026
14 min readHow to check video training data before you train on it
What 2025 and 2026 video papers show about automatic filters and human review, and the checks a data lead can run on a delivery.
21 November 2026
13 min readWhat makes gameplay data useful for world models and agents
What 2025 and 2026 research says about gameplay data for world models and game agents, from action labels and timing to idle time and coverage.
21 November 2026
13 min readWhat talking head video data needs for avatars and lip sync
What 2025 and 2026 avatar, lip sync and facial animation papers filtered for, what scale bought them, and what to check before buying talking head data.