Skip to content

fix: refuse background Command-W, Q, H and M with the tool to use - #49

Merged
iamnbutler merged 1 commit into
mainfrom
fix/semantic-shortcuts
Oct 17, 2026
Merged

iamnbutler merged 1 commit into
mainfrom
fix/semantic-shortcuts

Conversation

@iamnbutler

Copy link
Copy Markdown
Contributor

Peekaboo refuses these four background chords only after the bridge admits the request, and it throws an untyped error. desktop_key therefore reported them as unknown ("may have dispatched") although nothing was sent. Found while verifying #46.

The client now refuses command + w/q/h/m while validating the request, before the bridge is contacted. The hint names desktop_close, desktop_quit, desktop_hide or desktop_minimize. Only the exact ["command"] modifier set is matched, as in Peekaboo's policy. Command-Shift-W and similar chords go through the normal path. A key's character is resolved through the keyboard layout (#46), so this matches the same chords the host policy matches.

ActionError gains an optional hint, which the result reports when nothing was invoked. No patches change. The tool description and docs/tools.md say which tools to use instead.

Verified against a dev build: command + w → Outcome: refused, message "Command-W can't be verified when sent to a background window, so it isn't sent.", hint "Use desktop_close instead; it reports whether it took effect.", requires_fresh_observation: false. command + shift + w reaches the snapshot check as before. npm run check passes and the native build is green.

🤖 Generated with Claude Code

Peekaboo refuses these background chords after the bridge admits the
request, with an untyped error, so desktop_key reported them as unknown
(possibly dispatched) although nothing was sent. The client now refuses
them while validating the request, before contacting the bridge, with a
hint naming desktop_close, desktop_quit, desktop_hide or desktop_minimize.

Co-Authored-By: Claude <noreply@anthropic.com>
@iamnbutler
iamnbutler merged commit 8247017 into main Oct 17, 2026
2 checks passed
@iamnbutler
iamnbutler deleted the fix/semantic-shortcuts branch October 17, 2026 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant