injecting-mouse-and-keyboard

injecting-mouse-and-keyboard is a skill for Claude Code, Codex from skydoves/android-testing-skills. It costs 250 tokens per session (4,408 once invoked), scanned A, original, Apache-2.0.

A guide to simulating mouse and keyboard input in Jetpack Compose tests. It covers desktop-style pointer actions, scrolling, drag-and-drop, keyboard shortcuts, hover behaviour, and combined input.

In plain words
What is it for?
Use it for desktop or Compose Multiplatform UI, hover effects, right-click menus, mouse scrolling, drag-and-drop, keyboard navigation, shortcuts, and multi-input interactions.
Why use it?
It lets tests exercise interfaces that do not respond only to finger touches, using coordinates and input state tied to the target node.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for desktop or Compose Multiplatform UI, hover effects, right-click menus, mouse scrolling, drag-and-drop, keyboard navigation, shortcuts, and multi-input interactions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/skydoves/android-testing-skills/injecting-mouse-and-keyboard
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.

Any agent
npx skills add skydoves/android-testing-skills --skill injecting-mouse-and-keyboard
Clone the repo
git clone --depth 1 https://github.com/skydoves/android-testing-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for injecting-mouse-and-keyboard

README.md
[![agentmods](https://agentmods.dev/badge/skills/skydoves/android-testing-skills/injecting-mouse-and-keyboard/github.svg)](https://agentmods.dev/skills/skydoves/android-testing-skills/injecting-mouse-and-keyboard)
Your own site
<a href="https://agentmods.dev/skills/skydoves/android-testing-skills/injecting-mouse-and-keyboard"><img src="https://agentmods.dev/badge/skills/skydoves/android-testing-skills/injecting-mouse-and-keyboard/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for injecting-mouse-and-keyboard

Your own site · 80×15
<a href="https://agentmods.dev/skills/skydoves/android-testing-skills/injecting-mouse-and-keyboard"><img src="https://agentmods.dev/badge/skills/skydoves/android-testing-skills/injecting-mouse-and-keyboard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 250 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,408 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00250 $0.04408
Opus 5.5 $0.00100 $0.01763
Sonnet 5.5 $0.00050 $0.00882
Haiku 4.5 $0.00025 $0.00441

Measured 3mo ago against content hash 5054fc863acf, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

injecting-mouse-and-keyboard 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 3mo 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.

compose/actions/injecting-mouse-and-keyboard/SKILL.md · 262 lines

How it starts

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

Injecting Mouse and Keyboard — performMouseInput, performKeyInput, performMultiModalInput

Mouse and keyboard input are first-class modalities in Compose tests. Each has its own injection scope and entry point, plus a shared performMultiModalInput that combines all of them inside one batched gesture (touch, mouse, key, rotary, trackpad, indirect pointer). Coordinates remain node-local — the same rules as touch — and the entire injection state survives across perform.*Input blocks on the same node.

When to use this skill

  • The test exercises a desktop or Compose Multiplatform UI that responds to clicks, hover, right-click, scroll wheel, or modifier keys.
  • The test must drive a keyboard shortcut (e.g. Ctrl+S, Shift+Tab, arrow-key navigation).
  • The test must verify hover-only behaviour: tooltip pop, color change on Modifier.hoverable, mouse-only ripple state.
  • The test simulates a drag-and-drop with a mouse pointer.
  • The test must combine modalities — for example "hover at (x, y) then click and hold while pressing Shift".

When NOT to use this skill

  • The interaction is a finger tap or drag — use ../injecting-touch-gestures/SKILL.md. Mouse is not interchangeable with touch on Android device tests.
  • A simple performClick() already routes through the right modality per platform — use ../clicking-and-scrolling/SKILL.md.
  • The test types into a TextField — use ../entering-text/SKILL.md. Key input here is for shortcuts, not text entry.
  • The test waits for a hover-driven animation to settle — pause the clock first per ../../synchronization/testing-animations-deterministically/SKILL.md.

Prerequisites

  • androidx.compose.ui:ui-test-junit4 (or ui-test for runComposeUiTest) configured per ../../setup/configuring-test-dependencies/SKILL.md.
  • For mouse hover events on Android: API level that supports hover (typically API 23+) — Robolectric host tests work but check @Config(minSdk = …).
  • For key input that targets a focusable node: the node must be focusable (e.g. wrapped in Modifier.focusable() or Modifier.focusRequester(...)). Otherwise key events route to the focused root.

Read the full file on GitHub · 262 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. 3mo ago First seen · 262 lines · 250 tokens per session scan A 5054fc863acf

Subscribe to this mod's changes

injecting-mouse-and-keyboard is a skill published in the GitHub repository skydoves/android-testing-skills (351 stars, last pushed 6mo ago), licensed Apache-2.0. It adds 250 tokens to every session and 4,408 once invoked, about $0.0010 per session on Opus 5.5. 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.

Related

injecting-mouse-and-keyboard compared with skills from other repositories

injecting-mouse-and-keyboard next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
injecting-mouse-and-keyboardskydoves/android-testing-skillsSkill3516mo agoApache-2.0A250Claude Code, Codex
android-ui-journey-testingsickn33/agentic-awesome-skillsSkill51ktodayMITA27Claude Code
android_ui_verificationsickn33/agentic-awesome-skillsSkill51ktodayMITA22Claude Code
solopi-aialipay/SoloPiSkill6.8ktodayApache-2.0A82Codex
public-transitchromium/chromiumSkill25ktodayBSD-3-ClauseA53Claude Code, Codex
eas-simulatorexpo/skillsSkill4.3ktodayMITA251Claude Code, Codex
dogfoodcallstack/agent-deviceSkill5.6ktodayMITA55Claude Code