press

A keyboard-control command that sends xdotool-style key combinations, such as copy, paste, or Return, to a chosen window or the foreground application.

In plain words
What is it for?
Use it to send key chords, repeat them, add delays or hold times, and control whether input goes to a specific window or the foreground application.
Why use it?
It removes the need to press keys manually during desktop automation, while allowing the target window and focus to be checked.

Command

▶ Your AI Agent Can Now Drive Your Mac (Peekaboo Tutorial) Omar Kamal · about openclaw/Peekaboo · on YouTube →
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/openclaw/peekaboo/press
Clone the repo
git clone --depth 1 https://github.com/openclaw/Peekaboo
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 971 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00971
Opus 5 $0.00000 $0.00485
Sonnet 5 $0.00000 $0.00194
Haiku 4.5 $0.00000 $0.00097

Measured 3d ago against content hash 06d77f4269b4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

press scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/commands/press.md · 67 lines

How it starts

The opening of the file, as written. The whole thing — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.

peekaboo press

press sends raw xdotool key-style chords such as cmd+c, cmd+shift+t, and Return. Multiple positional chords form a sequence. Raw keys require either --foreground or an exact window/snapshot receipt whose focused element stays unchanged through native background dispatch.

Key options

Flag Description
[chords…] Chords in xdotool syntax. Modifiers are cmd/command, shift, option/alt, ctrl/control, and fn; the non-modifier key comes last.
--count <n> Repeat the entire key sequence n times (default 1).
--delay <duration> Delay between key presses (default 100ms; bare values are milliseconds).
--hold <duration> Hold duration per key (default 50ms; bare values are milliseconds).
--snapshot <id> Optional snapshot ID used for validation/focus (no implicit “latest snapshot” lookup).
Target flags An exact window selector enables receipt-pinned background press; app/PID-only targeting still requires --foreground.
--foreground Focus a supplied target or intentionally send foreground/global key presses.
Focus flags Foreground focus controls; same FocusCommandOptions bundle as click/type.

Delivery mode

  • Exact background accepts only a fresh exact-window selector or snapshot. Peekaboo pins process generation, window ID/bounds, and focused-element identity; missing, ambiguous, or stale receipts refuse before dispatch. App/PID-only and targetless forms retain the canonical retry-safe refusal.
  • Background-only Agent/MCP accepts only an explicit fresh exact non-dialog snapshot. Window-selector-only and implicit-latest forms are also refused by that stricter policy.
  • Foreground (--foreground) focuses a supplied target first and sends normal/global key presses. A dispatched chord remains effect: unverifiable; run a fresh observation before continuing.
  • Prefer named Accessibility actions and dedicated menu/window/app/dialog operations in background workflows. Exact-window press exposes the receipt-pinned transport but still reports its semantic effect honestly.

Read the full file on GitHub · 67 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 67 lines · 0 tokens per session scan A 06d77f4269b4

Subscribe to this mod's changes

press is a command published in the GitHub repository openclaw/Peekaboo (5,098 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 971 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.