/install hidpi-mouse
HiDPI Mouse Skill
Universal mouse coordinate handling for desktop automation across different screen configurations.
🚀 Quick Start
# Click at Claude display coordinates (auto-scales)
./scripts/click.sh 500 300
# First time? Run calibration for best accuracy
./scripts/calibrate.sh
📐 How It Works
When Claude displays a screenshot, it scales it down. This skill converts coordinates:
Claude Display Coords → Scale Factor → xdotool Screen Coords
The scale factor depends on:
- Screen resolution (1080p, 1440p, 4K, etc.)
- DPI settings (96, 144, 192, etc.)
- Claude's display viewport
🔧 Scripts
click.sh - Click at coordinates
./scripts/click.sh \x3Cx> \x3Cy> # Auto-scaled click
./scripts/click.sh --raw \x3Cx> \x3Cy> # No scaling (screen coords)
./scripts/click.sh --double \x3Cx> \x3Cy> # Double click
./scripts/click.sh --right \x3Cx> \x3Cy> # Right click
calibrate.sh - Setup & Configuration
./scripts/calibrate.sh # Interactive calibration
./scripts/calibrate.sh info # Show current config
./scripts/calibrate.sh test # Test current scale
./scripts/calibrate.sh set 2.08 # Manually set scale
./scripts/calibrate.sh reset # Reset to auto-detect
detect-scale.sh - Get scale factor
./scripts/detect-scale.sh # Returns scale (e.g., 2.08)
Other scripts
./scripts/move.sh \x3Cx> \x3Cy> # Move mouse
./scripts/drag.sh \x3Cx1> \x3Cy1> \x3Cx2> \x3Cy2> # Drag
./scripts/reliable_click.sh \x3Cx> \x3Cy> [--window "Name" --relative]
🎯 Calibration (Recommended for New Systems)
For best accuracy on your specific system:
./scripts/calibrate.sh
This will:
- Create a calibration image with markers at known positions
- Ask you where the markers appear in Claude's display
- Calculate and save the exact scale factor
📊 Common Scale Factors
| Screen | DPI | Typical Scale |
|---|---|---|
| 1920×1080 | 96 | 1.0 - 1.2 |
| 2560×1440 | 96 | 1.3 - 1.5 |
| 3024×1772 | 192 | 2.08 |
| 3840×2160 | 192 | 2.0 - 2.5 |
🔍 Troubleshooting
Clicks are offset
# Run calibration
./scripts/calibrate.sh
# Or manually adjust
./scripts/calibrate.sh set 2.1 # Try different values
Check current configuration
./scripts/calibrate.sh info
Reset everything
./scripts/calibrate.sh reset
rm -f /tmp/hidpi_scale_cache
📁 Configuration Files
~/.config/hidpi-mouse/scale.conf- User-set scale (highest priority)/tmp/hidpi_scale_cache- Auto-detected scale cache (1 hour TTL)
🌐 Universal Compatibility
This skill auto-adapts to:
- ✅ Different screen resolutions (1080p to 4K+)
- ✅ Different DPI settings (96, 120, 144, 192, etc.)
- ✅ HiDPI/Retina displays
- ✅ Multi-monitor setups (primary display)
💡 Usage Tips
- Always calibrate on a new system for 100% accuracy
- Re-calibrate if you change display settings
- Use
--rawif you already have screen coordinates - Check
calibrate.sh infoto see current settings
📝 Example Workflow
# 1. Take screenshot
scrot /tmp/screen.png
# 2. View in Claude, identify button at display coords (500, 300)
# 3. Click it
./scripts/click.sh 500 300
# 4. If off-target, calibrate
./scripts/calibrate.sh
Tested on: Ubuntu/Debian with X11, various resolutions and DPI settings
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install hidpi-mouse - 安装完成后,直接呼叫该 Skill 的名称或使用
/hidpi-mouse触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
HiDPI Mouse 是什么?
Universal HiDPI mouse click handling for Linux desktop automation. Auto-detects scale factor or allows calibration for any screen resolution/DPI. Converts Claude display coordinates to xdotool screen coordinates. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1698 次。
如何安装 HiDPI Mouse?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install hidpi-mouse」即可一键安装,无需额外配置。
HiDPI Mouse 是免费的吗?
是的,HiDPI Mouse 完全免费(开源免费),可自由下载、安装和使用。
HiDPI Mouse 支持哪些平台?
HiDPI Mouse 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 HiDPI Mouse?
由 zeyuyuyu(@zeyuyuyu)开发并维护,当前版本 v1.0.0。