返回顶部
h

hidpi-mouseHiDPI鼠标

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.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
1,643
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

hidpi-mouse

HiDPI鼠标技能

跨不同屏幕配置的桌面自动化通用鼠标坐标处理。

🚀 快速开始

bash

点击Claude显示坐标(自动缩放)


./scripts/click.sh 500 300

首次使用?运行校准以获得最佳精度

./scripts/calibrate.sh

📐 工作原理

当Claude显示截图时,会将其缩小。本技能转换坐标:

Claude显示坐标 → 缩放因子 → xdotool屏幕坐标

缩放因子取决于:

  • - 屏幕分辨率(1080p、1440p、4K等)
  • DPI设置(96、144、192等)
  • Claude的显示视口

🔧 脚本

click.sh - 点击坐标

bash ./scripts/click.sh # 自动缩放点击 ./scripts/click.sh --raw # 无缩放(屏幕坐标) ./scripts/click.sh --double # 双击 ./scripts/click.sh --right # 右键点击

calibrate.sh - 设置与配置

bash ./scripts/calibrate.sh # 交互式校准 ./scripts/calibrate.sh info # 显示当前配置 ./scripts/calibrate.sh test # 测试当前缩放 ./scripts/calibrate.sh set 2.08 # 手动设置缩放 ./scripts/calibrate.sh reset # 重置为自动检测

detect-scale.sh - 获取缩放因子

bash ./scripts/detect-scale.sh # 返回缩放值(例如 2.08)

其他脚本

bash ./scripts/move.sh # 移动鼠标 ./scripts/drag.sh # 拖拽 ./scripts/reliable_click.sh [--window 名称 --relative]

🎯 校准(新系统推荐)

为您的特定系统获得最佳精度:

bash
./scripts/calibrate.sh

这将:

  1. 1. 创建带有已知位置标记的校准图像
  2. 询问您在Claude显示中标记出现的位置
  3. 计算并保存精确的缩放因子

📊 常见缩放因子

屏幕DPI典型缩放
1920×1080961.0 - 1.2
2560×1440
96 | 1.3 - 1.5 | | 3024×1772 | 192 | 2.08 | | 3840×2160 | 192 | 2.0 - 2.5 |

🔍 故障排除

点击偏移

bash

运行校准

./scripts/calibrate.sh

或手动调整

./scripts/calibrate.sh set 2.1 # 尝试不同值

检查当前配置

bash ./scripts/calibrate.sh info

重置所有设置

bash ./scripts/calibrate.sh reset rm -f /tmp/hidpiscalecache

📁 配置文件

  • - ~/.config/hidpi-mouse/scale.conf - 用户设置缩放(最高优先级)
  • /tmp/hidpiscalecache - 自动检测缩放缓存(1小时TTL)

🌐 通用兼容性

本技能自动适配:

  • - ✅ 不同屏幕分辨率(1080p到4K+)
  • ✅ 不同DPI设置(96、120、144、192等)
  • ✅ HiDPI/Retina显示屏
  • ✅ 多显示器设置(主显示器)

💡 使用技巧

  1. 1. 始终在新系统上校准以获得100%精度
  2. 重新校准如果更改了显示设置
  3. 使用--raw如果您已有屏幕坐标
  4. 检查calibrate.sh info查看当前设置

📝 示例工作流程

bash

1. 截取屏幕截图


scrot /tmp/screen.png

2. 在Claude中查看,识别显示坐标(500, 300)处的按钮

3. 点击它

./scripts/click.sh 500 300

4. 如果点击不准,进行校准

./scripts/calibrate.sh
已在以下环境测试:Ubuntu/Debian with X11,各种分辨率和DPI设置

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 hidpi-mouse-1776347489 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 hidpi-mouse-1776347489 技能

通过命令行安装

skillhub install hidpi-mouse-1776347489

下载

⬇ 下载 hidpi-mouse v1.0.0(免费)

文件大小: 9.13 KB | 发布时间: 2026-4-17 15:15

v1.0.0 最新 2026-4-17 15:15
Initial release of hidpi-mouse: universal HiDPI mouse click handling for Linux desktop automation.

- Converts Claude display coordinates to real screen coordinates for accurate mouse automation on HiDPI and standard screens.
- Auto-detects screen scale factor, or supports interactive/manual calibration for any resolution and DPI.
- Includes a suite of handy scripts: click, double-click, right-click, drag, mouse move, and reliable click, all with scale correction.
- Calibration workflow to ensure precision on all systems; configuration easily managed and reset.
- Compatible with various Linux/X11 desktop environments and adaptable to different screen/DPI setups.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部