Don't claim shift-command-S for the search window by default - #11
Open
MiMoHo wants to merge 1 commit into
Open
Conversation
The search hotkey defaulted to shift-command-S, which is Save As... in Word and the colour picker in iWork. A clipboard manager taking a shortcut that common away from the frontmost app, on a fresh install, without asking, is the wrong default - the user's report was that Save As... had stopped working. So register no default for it. The recorder then stays empty, -toggleSearchHotKey: registers nothing because it already guards on ShortcutRecorderEmptyCode, and the shortcut reaches the frontmost app as before. Anyone who wants the search window assigns a shortcut under "Search clipboard hotkey" in Preferences, and anyone who has already assigned one keeps it, because that value lives in the user domain rather than in the registered defaults. The documentation was out of sync with the code as well: help.md and readme.md both promised shift-command-B, while the registered default was keyCode 1, which is S. Both now say the shortcut is unset and where to set one. Verified with a test program against the bundled ShortcutRecorder that a control which was never assigned a combo reports ShortcutRecorderEmptyCode (-1), so the existing guard is what makes "no default" mean "no hotkey", and that assigning one lifts the guard. Builds with Xcode 26.5, 76 warnings, identical to master. Co-Authored-By: Claude <noreply@anthropic.com>
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.
Problem
The search hotkey defaults to shift-command-S. That is Save As… in Microsoft Word and the colour picker in iWork, among others. On a fresh install Flycut silently takes it away from whatever app the user is working in — the report that led to this was simply "Save As… stopped working".
A clipboard manager claiming a shortcut that common, system-wide, without asking, is the wrong default.
What this changes
No default is registered for
ShortcutRecorder searchHotkeyany more.The existing code already handles the empty case: the recorder stays empty and
toggleSearchHotKey:returns without registering anything, because it guards onShortcutRecorderEmptyCode. The shortcut therefore reaches the frontmost app exactly as it did before Flycut was installed.The main hotkey (shift-command-V) is untouched.
The documentation was wrong too
help.mdandreadme.mdboth promised shift-command-B, while the registered default waskeyCode 1, which is S. So the documented shortcut never worked and the one that did work was undocumented. Both files now say the shortcut is unset by default and where to assign one.Verification
ShortcutRecorderEmptyCode(−1), so the existing guard is what turns "no default" into "no hotkey" — and assigning a combo lifts the guard again.xcodebuild -scheme Flycut -configuration Release,BUILD SUCCEEDED), 76 warnings, identical tomasterbuilt the same way.Not independently reproduced by a second reviewer: the behaviour a user actually notices — shift-command-S reaching Word again — needs a fresh preferences domain and a key press, and keyboard synthesis is blocked by TCC from a terminal context. The code path is small and the guard it relies on is verified above, but if you would rather see it demonstrated on a clean profile before merging, say so and I will write up the steps.
Authored and reviewed with Claude Code using Claude Opus 5 at
xhighreasoning effort. Unlike the other open PRs from this fork, this one was not put through a multi-agent adversarial review — that capacity was exhausted at the time. The claims above are limited to what the test program and the build actually show.🤖 Generated with Claude Code