recover-mouse-input
Skill0 starsChanged 2 months agoMITView on GitHub
Use when Windows mouse clicks stop working, taskbar clicks flash red without activating, Alt-Tab fails, clicks work only in one app, foreground activation fails, or an invisible Task Switching overlay is suspected.
In this repository21 other files it gives its agents.
- codebase-designSkill
- domain-modelingSkill
- improve-codebase-architectureSkill
- uv-pythonSkill
- wizardSkill
- claude-cloudSkill
- dispatching-parallel-agentsSkill
- handoffSkill
- opcSkill
- opnSkill
- personal-skillsSkill
- reassign-pmSkill
- repo-lessonsSkill
- grillingSkill
- sampleSkill
- find-docsSkill
- liteparseSkill
- browse-xSkill
- frontend-designSkill
- pakeSkill
- playwrightSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use read-only diagnostics first.
- Very specific: line 14
Check GetGUIThreadInfo for mouse capture and inspect Explorer's XamlExplorerHostIslandWindow titled Task Switching.
- Very specific: line 18
If unresolved, replug the mouse and read PnP state.
- Distinctive: line 19
Verify the target UI and one external app accept clicks, no GUI thread holds capture, and no enabled full-screen Task Switching hit surface …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Recover Mouse Input
Use read-only diagnostics first. Do not use Computer Use, synthetic clicks, or broad service shutdowns. Do not restart Explorer as a first fix — it does not clear a foreground-activation deadlock held by another app.
Workflow
- Confirm that the user is actively holding the left or right button before sampling
GetAsyncKeyState; a zero sample without a held button proves nothing. - During a real click, compare
WindowFromPointwithGetForegroundWindow. If the intended window is hit but foreground activation fails (taskbar flash / no activate), suspect a Windows input/foreground deadlock rather than the mouse or app. - Check
GetGUIThreadInfofor mouse capture and inspect Explorer'sXamlExplorerHostIslandWindowtitledTask Switching. A hidden or disabled surface is acceptable; do not kill Explorer or ChatGPT merely because that window exists. - Sample
GetForegroundWindowfor a few seconds. If one process stays foreground while taskbar/Alt-Tab fail, treat that process as the lock holder. Also readSPI_GETFOREGROUNDLOCKTIMEOUT(0x2000): a live value of2147483647with a normal registryHKCU\Control Panel\Desktop\ForegroundLockTimeout(e.g.200000) is a strong deadlock signal — do not chase the registry alone. - Preferred first recovery: ask the user to press
Ctrl+Alt+Delete, then return to the desktop. This secure-desktop transition fixed the observed deadlock when no single app was wedged on foreground. Do not claim an Explorer restart alone fixed it. - If CAD fails and a lock holder is identified: recover by clearing that app's foreground hold — prefer asking the user to
Alt+F4/ quit it (keyboard often still works in the focused app), or useAttachThreadInputto the foreground thread thenShowWindow/ShowWindowAsyncminimize (orSetForegroundWindowto the tray) and detach. Completion:SetForegroundWindowto a different top-level app succeeds without AttachThreadInput, and taskbar + Alt-Tab work. Do not kill Explorer for this path. Only terminate the lock-holder process if minimize/quit fails and the user approves. - If unresolved, replug the mouse and read PnP state. Inspect mouse class filters; standard
mouclassis expected. Do not edit filters or configuration. Restart a specific mouse device only with explicit user approval and elevation. - Verify the target UI and one external app accept clicks, no GUI thread holds capture, and no enabled full-screen Task Switching hit surface remains.
Known lock-holder pattern (2026-07)
Pake/Tauri desktop wraps (e.g. ChatGPT WEB APP.exe) can hold GetForegroundWindow for hours: taskbar clicks flash, Alt-Tab dies, Explorer restart does nothing, CAD may not clear it. Minimize/quit that process restores activation. Visible full-screen TextInputHost / "Windows Input Experience" is often a red herring when hit-tests still land on real apps.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

