Skip to content

Copy the selected clip with Command-C - #82

Open
alvst wants to merge 1 commit into
momenbasel:mainfrom
alvst:alvie/pr-cmd-c-copy
Open

Copy the selected clip with Command-C#82
alvst wants to merge 1 commit into
momenbasel:mainfrom
alvst:alvie/pr-cmd-c-copy

Conversation

@alvst

@alvst alvst commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

⌘C in the bar copies the selected clip to the pasteboard, the same path the context menu's Copy already uses. Every successful copy now shows a brief "Copied to Clipboard" toast, so a copy that doesn't paste anywhere still gives feedback.

What changed

  • ⌘C copies the selected clip; the context menu's Copy action and ⌘C both route through copyItem.
  • A "Copied to Clipboard" toast appears after every successful copy and fades on its own.
  • A copied clip is promoted to the front of history.

Screenshots

Before:
00-baseline screenshots bar.png

After:
01-cmd-c-copy screenshots after.png

Notes for review

  • The promote-to-front is deliberate, not a side effect. Copying a clip back out of history is a re-use of it, and the monitor correctly ignores Pesty's own pasteboard writes, so without this the clip you just reached for stays buried where it was. It's the same ordering rule a fresh copy from any other app already gets.
  • Merge-order note: alvie/pr-16-paste-reliability adds a byte-identical ClipboardStore.promoteCopiedItem(_:at:). Git places them in different regions of the file, so it will not conflict — it will produce two identical methods and a redeclaration error. Whichever of the two merges second, delete the duplicate.
  • Out of scope: no toast for pastes, and no setting to turn the toast off.

This feature should be bundled into v2.

Part of #80.

- Add a Copied to Clipboard toast, shown after every successful copy
  (Command-C and the context menu's Copy action both go through copyItem).
- Promote the copied clip to the front of history, since copying an
  existing clip back to the pasteboard is a deliberate re-use of it and
  the clipboard monitor correctly ignores Pesty's own pasteboard writes.
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