injecting-mouse-and-keyboard

Simulate complex mouse and keyboard input events in Jetpack Compose testing environments.

Updated Jul 20, 2026
One-click install
npx skills add https://github.com/trancee/MeshLink-template --skill injecting-mouse-and-keyboard-trancee
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: injecting-mouse-and-keyboard
Source: https://github.com/trancee/MeshLink-template/tree/main/.agents/skills/android-testing-skills/compose/actions/injecting-mouse-and-keyboard
Command: npx skills add https://github.com/trancee/MeshLink-template --skill injecting-mouse-and-keyboard-trancee

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill solves the challenge of testing complex desktop and Compose Multiplatform UI interactions that require non-touch inputs like right-clicks, keyboard shortcuts, and hover states.

Core Features & Use Cases

  • Advanced Input Simulation: Perform mouse actions like right-click, drag-and-drop, and smooth scrolling, or keyboard actions like modifier-key shortcuts.
  • Multi-modal Gestures: Combine touch, mouse, and keyboard inputs into a single batched gesture for complex UI scenarios.
  • Use Case: Use this skill to verify that a custom tooltip appears on hover, or to ensure that a Ctrl+S keyboard shortcut correctly triggers a save operation in your application.

Quick Start

Use the injecting-mouse-and-keyboard skill to simulate a right-click on the submit button and then press the Ctrl+S key combination to trigger the save action.

Frequently Asked Questions about injecting-mouse-and-keyboard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I simulate mouse hover and right-click events in Jetpack Compose UI tests?▼

To simulate mouse hover and right-click events in Jetpack Compose UI tests, you inject complex mouse input events within testing environments to validate desktop UI components requiring non-touch interactions.

Can I test keyboard shortcut sequences like Ctrl+S in Compose Multiplatform?▼

Yes, you can test keyboard shortcut sequences like Ctrl+S in Compose Multiplatform by simulating keyboard actions, including modifier-key shortcuts, to verify that specific key combinations correctly trigger application operations.

Do I need androidx.compose.ui:ui-test-junit4 to inject multi-modal gestures?▼

Yes, you need the androidx.compose.ui:ui-test-junit4 library to inject multi-modal gestures, as it provides the input injection scopes and manages event-time synchronization required for batching touch, mouse, and keyboard inputs.

What is the best way to batch touch, mouse, and keyboard inputs for complex UI scenarios?▼

The best way to batch touch, mouse, and keyboard inputs for complex UI scenarios is combining them into a single batched gesture, allowing you to validate multi-modal interactions within Compose Multiplatform testing environments.

How does input injection handle event-time synchronization during drag-and-drop testing?▼

Input injection handles event-time synchronization during drag-and-drop testing by utilizing the androidx.compose.ui:ui-test-junit4 library to manage event-time synchronization and execute input injection scopes accurately.