Setup & Installation
Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:
What This Skill Does
CGEvent injects hardware-level HID mouse events directly into the macOS event stream, bypassing all application-layer filtering. Works where CDP .click(), JavaScript .click(), and AppleScript fail: file upload dialogs, React dropzones, native macOS prompts. Zero dependencies, Python 3 stdlib only.
CGEvent operates at the HID layer below all application logic, so no app can filter or ignore its events the way they can with CDP, JavaScript click methods, or AppleScript.
When to use it
- Uploading files through React dropzones that ignore CDP automation
- Clicking native macOS dialog buttons invisible to browser automation
- Automating Electron apps when accessibility APIs return nothing
- Navigating multi-step UI flows across any macOS application
- Triggering and completing file picker dialogs in security-blocked web apps
Example Workflow
Here's how your AI assistant might use this skill in practice.
User asks: upload /Users/me/image.png to a web app with a React dropzone
- 1Take a screenshot to identify the upload area coordinates
- 2Run macos_click.py click 750 400 to open the native file dialog via CGEvent
- 3Use AppleScript to open Go to Folder (Cmd+Shift+G) and paste the full file path
- 4Confirm navigation and press return to complete the upload
File uploaded successfully through the native file dialog
Requirements
Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.