Repository navigation
fix: refuse background Command-W, Q, H and M with the tool to use - #49
Merged
Merged
Conversation
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>
8 tasks
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Peekaboo refuses these four background chords only after the bridge admits the request, and it throws an untyped error.
desktop_keytherefore reported them asunknown("may have dispatched") although nothing was sent. Found while verifying #46.The client now refuses
command+w/q/h/mwhile validating the request, before the bridge is contacted. The hint namesdesktop_close,desktop_quit,desktop_hideordesktop_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.ActionErrorgains an optional hint, which the result reports when nothing was invoked. No patches change. The tool description anddocs/tools.mdsay 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+wreaches the snapshot check as before.npm run checkpasses and the native build is green.🤖 Generated with Claude Code