Skip to content

v0.4.0

Choose a tag to compare

@brandy2015 brandy2015 released this 01 Nov 01:10
· 21 commits to main since this release

多条输入路径 / Multiple input paths

v0.4.0 先实测事件流是否卡住,再自动挑一条走得通的输入路径,输出 JSON 写明实际走的路(path)和是否读回核对(verified)。
v0.4.0 actively probes whether the event stream is stuck, then picks a working input path and reports which one it used (path) and whether it was verified by read-back (verified).

  • 健康检查 / Health check:除了读 CGGetEventTapList 统计,每次实测一个无副作用的标记事件走完整条事件流的时间(400 ms 超时);统计过时的监听列为 staleTapStats。check --probe 连鼠标也测,XYZLCU_PROBE=0 关闭。/ besides tap stats, a harmless tagged event is timed through the whole stream (400 ms timeout); stale stats are reported as staleTapStats.
  • type --via auto|ax|events|pid|paste:卡住时 ax(AXSelectedText)→ pid(CGEventPostToPid)→ paste(剪贴板 + 「编辑>粘贴」菜单),每步读回核对;全部失败退出码 4。新增 --window 标题:焦点不在该窗口就拒绝输入。/ when blocked: ax → pid → paste, each verified; new --window guard.
  • key --via auto|events|menu|pid:卡住时先按快捷键相同的菜单项(如 cmd+a → 编辑>全选),没有菜单项的键用 CGEventPostToPid;都不行给出明确错误。/ when blocked: matching menu item first, then CGEventPostToPid, else a clear error.
  • menu 不再激活应用 / no longer activates the app:后台也能按应用级菜单项;作用于文稿的菜单项(全选等)在后台被系统置灰,需要时加 --activate。/ document-level items need --activate.
  • record / replay:只监听(listenOnly)录制键鼠,文件 0600 只存本机,密码框和锁屏时不录按键;按原节奏回放,事件流卡住或锁屏时拒绝/停止。不加抖动,不做反检测。/ listen-only recording, local 0600 file, no keys in secure input or while locked; replay with original timing, refuses when the stream is blocked, stops on lock. No jitter, no anti-detection.
  • check 新增 paths(各路径可用性和 probeMs)、typeOrder、keyOrder;taps 新增 blocking。
  • build.sh --install 改为临时文件 + mv,避免覆盖正在使用的已签名二进制时新进程被 SIGKILL。/ install via temp file + mv to avoid SIGKILL.

安装 / Install: 下载 xyzlcu-macos-universal.zip,解压后放到 ~/.local/bin/;如果守护进程在运行,先 xyzlcu serve --stop。