← ClaudeAtlas

mouse-doctorlisted

Diagnose and recover mouse clicks that suddenly stop working across macOS apps in setups using LinearMouse or Karabiner-Elements. Inspect system load and the relevant input processes before restarting anything, then restore them in priority order. Use when clicks stop responding app-wide and at least one of those tools is installed.
gitt510/agent-skills · ★ 0 · AI & Automation · score 70
Install: claude install-skill gitt510/agent-skills
# Mouse Doctor macOS で「全アプリでクリックが効かない」を直すための診断フロー。LinearMouse または Karabiner-Elements が入っている環境を対象に、**macOS の入力経路の劣化**を 有力候補として切り分ける。どちらも入っていない場合は、この runbook の対象外として hardware・接続・権限の通常診断へ切り替える。 ## なぜクリックが死ぬのか(この理解が誤診を防ぐ) LinearMouse と Karabiner-Elements は、異なる方法で macOS の入力経路に入る: - **LinearMouse** — event tap を使ったポインタ加速・速度・スクロール調整 - **Karabiner-Elements** — Core-Service による device grab とキー remap システム負荷や swap thrash で event-tap callback が遅れると、macOS が tap を無効化する ことがある。アプリが tap を再作成しても負荷が続けば再発するため、click が失われている ように見える。これは有力な作業仮説であり、特定ツールの欠陥や唯一の原因と断定しない。 ## まず read-only で切り分ける 原因を決めてから直す。この診断ブロックはすべて非破壊: ```bash echo "=== 1. LinearMouse: version / CPU累積 / uptime ===" ps -Ao pid,%cpu,time,etime,comm | grep "[L]inearMouse" defaults read /Applications/LinearMouse.app/Contents/Info.plist CFBundleShortVersionString 2>/dev/null echo "=== 2. Karabiner Core-Service(正常形は root daemon + user agent の2本)===" ps -Ao pid,user,etime,%cpu,comm | grep "[K]arabiner-Core-Service" echo "=== 3. システム全体のメモリ / swap / load(tap timeout の引き金)===" memory_pressure 2>/dev/null | grep -i "free percentage" sysctl -n vm.swapusage uptime sysctl -n hw.ncpu # load average はコア数と比べて読む echo "=== 4. メモリを食っている上位プロセス(逼迫の主犯特定)===" ps -Ao rss,pid,comm -r | head -6 | awk '{printf "%6.1f MB %s\n",$1/1024,$3}' echo "=== 5. CPU を食っている上位プロセス(飢餓の主犯特定)===" ps -Ao %cpu,pid,comm -r | head -8 ``` 読み方: - **LinearMouse の version が古い / `%CPU` が高止まり** → LinearMouse の tap latency が主犯の疑い がある。 - **Karabiner Core-Service が長時間 u